From 03cb9443ee6221bfe3476e24a8617c6247857a59 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 18 Nov 2024 11:02:01 -0600 Subject: [PATCH] add parameter usage to updateLock --- home/private_dot_config/nim/config.nims | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/home/private_dot_config/nim/config.nims b/home/private_dot_config/nim/config.nims index 2246aa0..dc5dd0d 100644 --- a/home/private_dot_config/nim/config.nims +++ b/home/private_dot_config/nim/config.nims @@ -7,7 +7,7 @@ import std/[ switch("hint","[Conf]:off") -proc forward_args(task_name: string): seq[string] = +proc forwardArgs(task_name: string): seq[string] = let args = command_line_params() let arg_start = args.find(task_name) + 1 return args[arg_start..^1] @@ -102,7 +102,10 @@ task b, fmt"build binary, default: {name}": setCommand "c","" task updateLock, "workaround for nimble lock probs": - let nimbleFile = projectDir().lastPathPart & ".nimble" + let params = forwardArgs("updateLock") + let nimbleFile = + if params.len == 1: params[0] + else: projectDir().lastPathPart & ".nimble" if not fileExists nimbleFile: quit "expected to find: " & nimbleFile rmDir "nimbledeps"