8000 better input handling · coder/start-workspace-action@193f992 · GitHub
[go: up one dir, main page]

Skip to content

Commit 193f992

Browse files
committed
better input handling
1 parent f86372c commit 193f992

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

dist/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Source hash: 19ceaee5753b47a4b702e1a86f0e92985f96bae6d23e4424bfaad638a7502b1b
1+
// Source hash: 0ceb1709571d8df0b6b615a73ceabfd1601ad2c7816f5a81e36972d318e7bc95
22
import { createRequire } from "node:module";
33
var __create = Object.create;
44
var __getProtoOf = Object.getPrototypeOf;
@@ -30619,7 +30619,10 @@ var main = async () => {
3061930619
templateName: "TEMPLATE_NAME",
3062030620
workspaceParameters: "WORKSPACE_PARAMETERS"
3062130621
};
30622-
const input = ActionInputSchema.parse(Object.fromEntries(Object.entries(inputEnv).map(([key, value]) => [key, process.env[value]])));
30622+
const input = ActionInputSchema.parse(Object.fromEntries(Object.entries(inputEnv).map(([key, value]) => [
30623+
key,
30624+
process.env[value] === "" ? undefined : process.env[value]
30625+
])));
3062330626
const action = new StartWorkspaceAction(console, input);
3062430627
await action.execute();
3062530628
};

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ const main = async () => {
2828

2929
const input = ActionInputSchema.parse(
3030
Object.fromEntries(
31-
Object.entries(inputEnv).map(([key, value]) => [key, process.env[value]])
31+
Object.entries(inputEnv).map(([key, value]) => [
32+
key,
33+
process.env[value] === "" ? undefined : process.env[value],
34+
])
3235
)
3336
);
3437
const action = new StartWorkspaceAction(console, input);

0 commit comments

Comments
 (0)
0