mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-07-02 03:13:48 +03:00
Use nix flake update if no inputs are specified
This commit is contained in:
parent
7352b7f36b
commit
fc5dacd10b
4 changed files with 12 additions and 17 deletions
|
@ -22,10 +22,10 @@ test("Nix command arguments", () => {
|
|||
"--log-format",
|
||||
"raw",
|
||||
"flake",
|
||||
"lock",
|
||||
"update",
|
||||
"--commit-lock-file",
|
||||
"--commit-lockfile-summary",
|
||||
'"just testing"',
|
||||
"just testing",
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ test("Nix command arguments", () => {
|
|||
"rust-overlay",
|
||||
"--commit-lock-file",
|
||||
"--commit-lockfile-summary",
|
||||
'"just testing"',
|
||||
"just testing",
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -55,10 +55,10 @@ test("Nix command arguments", () => {
|
|||
expected: [
|
||||
"--debug",
|
||||
"flake",
|
||||
"lock",
|
||||
"update",
|
||||
"--commit-lock-file",
|
||||
"--commit-lockfile-summary",
|
||||
'"just testing"',
|
||||
"just testing",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
10
src/nix.ts
10
src/nix.ts
|
@ -9,12 +9,10 @@ export function makeNixCommandArgs(
|
|||
input,
|
||||
]);
|
||||
|
||||
const updateLockMechanism = flakeInputFlags.length === 0 ? "update" : "lock";
|
||||
|
||||
return nixOptions
|
||||
.concat(["flake", "lock"])
|
||||
.concat(["flake", updateLockMechanism])
|
||||
.concat(flakeInputFlags)
|
||||
.concat([
|
||||
"--commit-lock-file",
|
||||
"--commit-lockfile-summary",
|
||||
`"${commitMessage}"`,
|
||||
]);
|
||||
.concat(["--commit-lock-file", "--commit-lockfile-summary", commitMessage]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue