File tree 1 file changed +4
-6
lines changed
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,10 @@ abstract class CliCommand(protected val cliOptions: CliBaseOptions) {
76
76
/* * The Project used by this command. */
77
77
protected val project: Project ? by lazy {
78
78
if (cliOptions.noProject) {
79
- return @lazy null
79
+ null
80
+ } else {
81
+ cliOptions.normalizedProjectFile?.let { loadProject(it) }
80
82
}
81
- cliOptions.normalizedProjectFile?.let { loadProject(it) }
82
83
}
83
84
84
85
protected fun loadProject (projectFile : Path ): Project {
@@ -103,10 +104,7 @@ abstract class CliCommand(protected val cliOptions: CliBaseOptions) {
103
104
}
104
105
105
106
private val projectSettings: Project .EvaluatorSettings ? by lazy {
106
- if (cliOptions.omitProjectSettings) {
107
- return @lazy null
108
- }
109
- project?.settings
107
+ if (cliOptions.omitProjectSettings) null else project?.settings
110
108
}
111
109
112
110
protected val allowedModules: List <Pattern > by lazy {
You can’t perform that action at this time.
0 commit comments