Make 'update' optional

This commit is contained in:
davidsbond 2020-06-25 16:20:02 +01:00
parent d5f1550948
commit 82f8348041

View File

@ -13,13 +13,15 @@ interface CacheInput {
path: string;
key: string;
restoreKeys?: string[];
update: string;
update?: string;
}
export function setInputs(input: CacheInput): void {
setInput(Inputs.Path, input.path);
setInput(Inputs.Key, input.key);
setInput(Inputs.Update, input.update);
input.update
? setInput(Inputs.Update, input.update)
: setInput(Inputs.Update, "false");
input.restoreKeys &&
setInput(Inputs.RestoreKeys, input.restoreKeys.join("\n"));
}