Fix input validation

This commit is contained in:
Luc Perkins 2024-05-23 15:42:03 -03:00
parent 0c1dd1090d
commit c7eb3f32c9
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
3 changed files with 3 additions and 2 deletions

2
dist/index.js vendored
View file

@ -94839,7 +94839,7 @@ var UpdateFlakeLockAction = class extends DetSysAction {
}
}
validateInputs() {
if (this.flakeDirs !== null && this.flakeDirs.length > 0 && this.pathToFlakeDir !== "") {
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"
);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -104,6 +104,7 @@ class UpdateFlakeLockAction extends DetSysAction {
if (
this.flakeDirs !== null &&
this.flakeDirs.length > 0 &&
this.pathToFlakeDir !== null &&
this.pathToFlakeDir !== ""
) {
// TODO: improve this error message