Skip to content

Commit e7299ba

Browse files
committed
nimble uninstall reads .nimble files using nimscript
unrelated test failures were triggered by a missing nim to execute nimscript to downgrade a removed package
1 parent 00063a7 commit e7299ba

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/nimble.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ when isMainModule:
22702270
# Actions that don't need a Nim binary should not trigger downloading Nim.
22712271
# This avoids e.g. `nimble --version` or `nimble list -i` fetching Nim binaries.
22722272
const actionsNotNeedingNim = {actionRefresh, actionSearch, actionList,
2273-
actionPath, actionUninstall, actionClean, actionManual,
2273+
actionPath, actionClean, actionManual,
22742274
actionNil}
22752275
let needsNim = not opt.showVersion and not opt.showHelp and
22762276
opt.action.typ notin actionsNotNeedingNim

src/nimblepkg/nimscriptwrapper.nim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ proc getNimblecache(): string =
4343
proc execNimscript(nimBin: string,
4444
nimbleFile, nimsFile, actionName: string, options: Options, isHook: bool
4545
): tuple[output: string, exitCode: int, stdout: string] =
46+
assert nimBin != ""
4647
let
4748
outFile = getNimbleTempDir() & ".out"
4849
isCustomTask = isCustomTask(actionName, options)

0 commit comments

Comments
 (0)