mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-22 15:15:50 -06:00
don't lock if it's not around
This commit is contained in:
parent
bdd67bd00b
commit
12a0eb60ab
2 changed files with 7 additions and 2 deletions
|
@ -191,7 +191,11 @@ hwylCli:
|
|||
currently just runs `jq < flake.lock '.nodes | keys[] | select(contains("_"))' -r`
|
||||
"""
|
||||
run:
|
||||
discard runCmd("nix flake lock")
|
||||
# use absolute value for flake.lock?
|
||||
quitWithCmd("""jq '.nodes | keys[] | select(contains("_"))' -r flake.lock""")
|
||||
if not isLocal():
|
||||
quit "`oizys lock` should be run with a local flake"
|
||||
|
||||
discard runCmd("nix flake lock " & getFlake())
|
||||
let lockfile = getFlake() / "flake.lock"
|
||||
quitWithCmd(fmt"""jq '.nodes | keys[] | select(contains("_"))' -r {lockFile}""")
|
||||
|
||||
|
|
|
@ -57,3 +57,4 @@ proc getHosts*(): seq[string] = return oc.hosts
|
|||
proc getFlake*(): string = return oc.flake
|
||||
proc isResetCache*(): bool = return oc.resetCache
|
||||
proc isCi*(): bool = return oc.ci
|
||||
proc isLocal*(): bool = return oc.flake.dirExists
|
||||
|
|
Loading…
Add table
Reference in a new issue