diff --git a/dist/index.js b/dist/index.js index 0f15b44..809fe89 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11515,7 +11515,7 @@ function getManifestDir(args) { function parseRustToolchain(content) { const toml = (0, toml_1.parse)(content.toString()); const toolchain = toml === null || toml === void 0 ? void 0 : toml.toolchain; - return toolchain === null || toolchain === void 0 ? void 0 : toolchain.channel; + return (toolchain === null || toolchain === void 0 ? void 0 : toolchain.channel) || ''; } async function getRustToolchain(args) { let rustToolchain = core.getInput('rust-toolchain'); @@ -11940,7 +11940,7 @@ function setupSccacheEnv() { async function hostBuild(maturinRelease, args) { const command = core.getInput('command'); const target = getRustTarget(args); - const rustToolchain = await getRustToolchain(args); + const rustToolchain = (await getRustToolchain(args)) || 'stable'; const rustupComponents = core.getInput('rustup-components'); const workdir = getWorkingDirectory(); const sccache = core.getBooleanInput('sccache'); diff --git a/src/index.ts b/src/index.ts index fc1a2ea..db2526a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -197,7 +197,7 @@ function getManifestDir(args: string[]): string { function parseRustToolchain(content: string): string { const toml = parseTOML(content.toString()) const toolchain = toml?.toolchain as JsonMap - return toolchain?.channel as string + return (toolchain?.channel as string) || '' } async function getRustToolchain(args: string[]): Promise { @@ -759,7 +759,7 @@ async function hostBuild( ): Promise { const command = core.getInput('command') const target = getRustTarget(args) - const rustToolchain = await getRustToolchain(args) + const rustToolchain = (await getRustToolchain(args)) || 'stable' const rustupComponents = core.getInput('rustup-components') const workdir = getWorkingDirectory() const sccache = core.getBooleanInput('sccache')