UNPKG

cc-zos

Version:

Command-line interface for the ZeppelinOS smart contract platform

25 lines (18 loc) 818 B
#! /usr/bin/env node 'use strict'; var _ccZosLib = require('cc-zos-lib'); var _lockfile = require('lockfile'); var _program = require('./program'); var _program2 = _interopRequireDefault(_program); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // Acquire file lock to ensure no other instance is running const LOCKFILE = '.zos.lock'; try { (0, _lockfile.lockSync)(LOCKFILE, { retries: 0 }); } catch (e) { console.error(`Cannot run more than one instance of 'zos' at the same time.\nIf you are sure that no other instances are actually running, manually remove the file ${LOCKFILE} and try again.`); process.exit(1); } _ccZosLib.Logger.silent(false); _program2.default.parse(process.argv); if (_program2.default.args.length === 0) _program2.default.help();