Implicitly disable package validation for run/build/compile.
This commit is contained in:
parent
901afa8c71
commit
0ed8e6403c
1 changed files with 7 additions and 2 deletions
|
|
@ -1112,7 +1112,7 @@ proc run(options: Options) =
|
||||||
|
|
||||||
doCmd("$# $#" % [binaryPath, args], showOutput = true)
|
doCmd("$# $#" % [binaryPath, args], showOutput = true)
|
||||||
|
|
||||||
proc doAction(options: Options) =
|
proc doAction(options: var Options) =
|
||||||
if options.showHelp:
|
if options.showHelp:
|
||||||
writeHelp()
|
writeHelp()
|
||||||
if options.showVersion:
|
if options.showVersion:
|
||||||
|
|
@ -1123,6 +1123,10 @@ proc doAction(options: Options) =
|
||||||
if not existsDir(options.getPkgsDir):
|
if not existsDir(options.getPkgsDir):
|
||||||
createDir(options.getPkgsDir)
|
createDir(options.getPkgsDir)
|
||||||
|
|
||||||
|
if options.action.typ in {actionTasks, actionRun, actionBuild, actionCompile}:
|
||||||
|
# Implicitly disable package validation for these commands.
|
||||||
|
options.disableValidation = true
|
||||||
|
|
||||||
case options.action.typ
|
case options.action.typ
|
||||||
of actionRefresh:
|
of actionRefresh:
|
||||||
refresh(options)
|
refresh(options)
|
||||||
|
|
@ -1177,7 +1181,8 @@ proc doAction(options: Options) =
|
||||||
var execResult: ExecutionResult[bool]
|
var execResult: ExecutionResult[bool]
|
||||||
if execCustom(options, execResult, failFast=not isPreDefined):
|
if execCustom(options, execResult, failFast=not isPreDefined):
|
||||||
if execResult.hasTaskRequestedCommand():
|
if execResult.hasTaskRequestedCommand():
|
||||||
doAction(execResult.getOptionsForCommand(options))
|
var options = execResult.getOptionsForCommand(options)
|
||||||
|
doAction(options)
|
||||||
else:
|
else:
|
||||||
# If there is no task defined for the `test` task, we run the pre-defined
|
# If there is no task defined for the `test` task, we run the pre-defined
|
||||||
# fallback logic.
|
# fallback logic.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue