fix async execution
This commit is contained in:
parent
0d34e2bc7f
commit
c0aba5d487
10
dist/mod_git/index.js
vendored
10
dist/mod_git/index.js
vendored
@ -38,8 +38,12 @@ exports.mirror = () => __awaiter(this, void 0, void 0, function* () {
|
||||
plugins.beautylog.info('found github token.');
|
||||
plugins.beautylog.log('attempting the mirror the repository to GitHub');
|
||||
// add the mirror
|
||||
npmci_bash_1.bash(`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`);
|
||||
npmci_bash_1.bash(`git push mirror`);
|
||||
yield npmci_bash_1.bash(`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`);
|
||||
yield npmci_bash_1.bash(`git push mirror`);
|
||||
}
|
||||
else {
|
||||
plugins.beautylog.error(`cannot find NPMCI_GIT_GITHUBTOKEN env var!`);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfZ2l0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSx5Q0FBd0M7QUFDeEMsOENBQW9DO0FBQ3BDLDRDQUFtQztBQUVuQzs7O0dBR0c7QUFDUSxRQUFBLFNBQVMsR0FBRyxDQUFPLE9BQU87SUFDbkMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxNQUFNLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMxQixJQUFJLE1BQU0sR0FBVyxPQUFPLENBQUMsQ0FBQyxDQUFFLENBQUMsQ0FBRSxDQUFBO1FBQ25DLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDZixLQUFLLFFBQVE7Z0JBQ1gsTUFBTSxjQUFNLEVBQUUsQ0FBQTtnQkFDZCxLQUFL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FJLENBQUMsSUFBSSxDQUFBO0lBQzFELEVBQUUsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7UUFDaEIsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMscUJBQXFCLENBQUMsQ0FBQTtRQUM3QyxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxnREFBZ0QsQ0FBQyxDQUFBO1FBQ3ZFLGlCQUFpQjtRQUNqQixNQUFNLGlCQUFJLENBQUMsaUNBQWlDLFdBQVcsZUFBZSxVQUFVLElBQUksVUFBVSxNQUFNLENBQUMsQ0FBQTtRQUNyRyxNQUFNLGlCQUFJLENBQUMsaUJBQWlCLENBQUMsQ0FBQTtJQUMvQixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTixPQUFPLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyw0Q0FBNEMsQ0FBQyxDQUFBO1FBQ3JFLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFDakIsQ0FBQztBQUNILENBQUMsQ0FBQSxDQUFBIn0=
|
@ -29,7 +29,10 @@ export let mirror = async () => {
|
||||
plugins.beautylog.info('found github token.')
|
||||
plugins.beautylog.log('attempting the mirror the repository to GitHub')
|
||||
// add the mirror
|
||||
bash(`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`)
|
||||
bash(`git push mirror`)
|
||||
await bash(`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`)
|
||||
await bash(`git push mirror`)
|
||||
} else {
|
||||
plugins.beautylog.error(`cannot find NPMCI_GIT_GITHUBTOKEN env var!`)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user