Skip to content

Commit

Permalink
Add repro for rollup/rollup#4995.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlstich committed May 16, 2023
1 parent b937a65 commit 827510e
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
12 changes: 12 additions & 0 deletions actions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { exec } = require('@actions/exec');

async function test() {
try {
await exec('bash test.sh');
console.log('Rollup completed successfully!');
} catch (error) {
console.error('Error occurred during Rollup:', error);
}
}

test();
19 changes: 19 additions & 0 deletions child_process.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { exec } = require('child_process');

function test() {
exec('bash test.sh', (error, stdout, stderr) => {
if (error) {
console.error('Error occurred during test.sh:', error);
} else {
console.log('test.sh completed successfully!');
}
if (stdout) {
console.log('test.sh output:', stdout);
}
if (stderr) {
console.error('test.sh error output:', stderr);
}
});
}

test();
28 changes: 28 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "nodetest",
"version": "1.0.0",
"description": "",
"main": "actions.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"dependencies": {
"@actions/exec": "^1.1.1"
}
}
7 changes: 7 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
input: 'actions.js',
output: {
file: 'dist/bundle.js',
format: 'es',
},
};
9 changes: 9 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo "before"

npx rollup@3.21.5 -c

echo "between"

npx rollup@3.21.6 -c

echo "after"

0 comments on commit 827510e

Please sign in to comment.