mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-07-03 20:03:51 +03:00
Check for flake-dirs clash with inputs
This commit is contained in:
parent
b6aab91cde
commit
b5a9000c3f
4 changed files with 27 additions and 7 deletions
7
dist/index.js
vendored
7
dist/index.js
vendored
|
@ -94848,7 +94848,7 @@ var UpdateFlakeLockAction = class extends DetSysAction {
|
|||
validateInputs() {
|
||||
if (this.flakeDirs !== null && this.flakeDirs.length > 0 && this.pathToFlakeDir !== null && this.pathToFlakeDir !== "") {
|
||||
throw new Error(
|
||||
"Both `path-to-flake-dir` and `flake-dirs` are set, whereas only one can be set"
|
||||
"Both `path-to-flake-dir` and `flake-dirs` are set, whereas only one can be"
|
||||
);
|
||||
}
|
||||
if (this.flakeDirs !== null && this.flakeDirs.length === 0) {
|
||||
|
@ -94856,6 +94856,11 @@ var UpdateFlakeLockAction = class extends DetSysAction {
|
|||
"The `flake-dirs` input is set to an empty array; it must contain at least one directory"
|
||||
);
|
||||
}
|
||||
if (this.flakeDirs !== null && this.flakeDirs.length > 0 && this.flakeInputs.length > 0) {
|
||||
throw new Error(
|
||||
`You've set both \`flake-dirs\` and \`inputs\` but you can only set one`
|
||||
);
|
||||
}
|
||||
}
|
||||
ensureDirectoryExists(flakeDir) {
|
||||
core.debug(`Checking that flake directory \`${flakeDir}\` exists`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue