feat: remove setting the default of source-dir to .

This commit is contained in:
Alfi Maulana 2024-03-25 12:53:39 +07:00
parent 6c4e2145fb
commit 72821fb225
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
3 changed files with 3 additions and 3 deletions

2
dist/index.js generated vendored
View File

@ -27771,7 +27771,7 @@ var external_node_path_default = /*#__PURE__*/__nccwpck_require__.n(external_nod
function getInputs() { function getInputs() {
const sourceDir = (0,core.getInput)("source-dir") || "."; const sourceDir = (0,core.getInput)("source-dir");
return { return {
sourceDir, sourceDir,
buildDir: (0,core.getInput)("build-dir") || external_node_path_default().join(sourceDir, "build"), buildDir: (0,core.getInput)("build-dir") || external_node_path_default().join(sourceDir, "build"),

View File

@ -150,7 +150,7 @@ describe("get action inputs", () => {
}); });
expect(getInputs()).toStrictEqual({ expect(getInputs()).toStrictEqual({
sourceDir: ".", sourceDir: "",
buildDir: "build", buildDir: "build",
generator: "", generator: "",
cCompiler: "", cCompiler: "",

View File

@ -16,7 +16,7 @@ export interface Inputs {
} }
export function getInputs(): Inputs { export function getInputs(): Inputs {
const sourceDir = getInput("source-dir") || "."; const sourceDir = getInput("source-dir");
return { return {
sourceDir, sourceDir,
buildDir: getInput("build-dir") || path.join(sourceDir, "build"), buildDir: getInput("build-dir") || path.join(sourceDir, "build"),