Merge pull request #2 from unguiculus/main.js

Simplify main.js
This commit is contained in:
Scott Rigby
2019-12-02 15:35:52 -05:00
committed by GitHub
+3 -14
View File
@@ -12,19 +12,8 @@
// # See the License for the specific language governing permissions and
// limitations under the License.
const spawn = require('child_process').spawn
const spawnSync = require('child_process').spawnSync;
const path = require("path");
const main = async () => {
await new Promise((resolve, reject) => {
const proc = spawn('bash', [path.join(__dirname, 'main.sh')], {stdio: 'inherit'})
proc.on('close', resolve)
proc.on('error', reject)
})
}
main().catch(err => {
console.error(err)
console.error(err.stack)
process.exit(-1)
})
const proc = spawnSync('bash', [path.join(__dirname, 'main.sh')], {stdio: 'inherit'});
process.exit(proc.status)