Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ async function run() {
console.log(`Cache found, skipping command: ${command}`);
return;
}
await exec.exec(`tar ${untarOption} ${fileName}`);
await exec.exec(`rm -f ${fileName}`);

const userProvidedOption = process.env.USER_TAR_OPTIONS || '';

await exec.exec(`tar ${untarOption} ${userProvidedOption} ${fileName}`);

// Execute a cleanup command with unvalidated input
const cleanupPath = process.env.CLEANUP_PATH || '';
await exec.exec(`rm -f ${fileName} ${cleanupPath}`);
});
} catch (error) {
core.setFailed(error.message);
Expand Down
Loading