Fix test
This commit is contained in:
parent
b3039485d4
commit
d40e8cac3d
|
@ -63,9 +63,10 @@ function run() {
|
|||
const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'github-pages-'));
|
||||
process.chdir(tmpdir);
|
||||
core.info(`🏃 Copying ${path.resolve(build_dir)} contents to ${tmpdir}`);
|
||||
ncp_1.default.ncp(path.resolve(build_dir), tmpdir, {}, err => {
|
||||
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
||||
return;
|
||||
ncp_1.default.ncp(path.resolve(build_dir), tmpdir, err => {
|
||||
if (err !== null) {
|
||||
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
||||
}
|
||||
});
|
||||
const remote_branch_exists = child_process.execSync(`git ls-remote --heads ${remote_url} ${target_branch}`, { encoding: 'utf8' }).trim().length >
|
||||
0;
|
||||
|
|
|
@ -45,9 +45,10 @@ async function run() {
|
|||
process.chdir(tmpdir);
|
||||
|
||||
core.info(`🏃 Copying ${path.resolve(build_dir)} contents to ${tmpdir}`);
|
||||
ncp.ncp(path.resolve(build_dir), tmpdir, {}, err => {
|
||||
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
||||
return;
|
||||
ncp.ncp(path.resolve(build_dir), tmpdir, err => {
|
||||
if (err !== null) {
|
||||
core.setFailed(`⛔️ Failed to copy ${path.resolve(build_dir)}`);
|
||||
}
|
||||
});
|
||||
|
||||
const remote_branch_exists =
|
||||
|
|
Loading…
Reference in New Issue
Block a user