diff --git a/dist/npmci.test.js b/dist/npmci.test.js index 11ee055..a234f46 100644 --- a/dist/npmci.test.js +++ b/dist/npmci.test.js @@ -24,7 +24,12 @@ exports.test = (versionArg) => __awaiter(this, void 0, void 0, function* () { }); let npmDependencies = () => __awaiter(this, void 0, void 0, function* () { plugins.beautylog.info('now installing dependencies:'); - yield npmci_bash_1.bash('npm install'); + if (yield npmci_bash_1.yarnAvailable.promise) { + yield npmci_bash_1.bash('yarn install'); + } + else { + yield npmci_bash_1.bash('npm install'); + } }); let npmTest = () => __awaiter(this, void 0, void 0, function* () { plugins.beautylog.info('now starting tests:'); @@ -35,4 +40,4 @@ let testDocker = () => __awaiter(this, void 0, void 0, function* () { .then(NpmciBuildDocker.pullDockerfileImages) .then(NpmciBuildDocker.testDockerfiles); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDJDQUEwQztBQUMxQyw2Q0FBbUM7QUFDbkMsbURBQXlDO0FBRXpDLHlEQUF3RDtBQUU3QyxRQUFBLElBQUksR0FBRyxDQUFPLFVBQVU7SUFDakMsRUFBRSxDQUFDLENBQUMsVUFBVSxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUM7UUFDNUIsTUFBTSxVQUFVLEVBQUUsQ0FBQTtJQUNwQixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTixNQUFNLHVCQUFPLENBQUMsVUFBVSxDQUFDO2FBQ3RCLElBQUksQ0FBQyxlQUFlLENBQUM7YUFDckIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ2xCLENBQUM7QUFDSCxDQUFDLENBQUEsQ0FBQTtBQUVELElBQUksZUFBZSxHQUFHO0lBQ3BCLE9BQU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LENBQUM7YUFDckIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ2xCLENBQUM7QUFDSCxDQUFDLENBQUEsQ0FBQTtBQUVELElBQUksZUFBZSxHQUFHO0lBQ3BCLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLDhCQUE4QixDQUFDLENBQUE7SUFDdEQsRUFBRSxDQUFDLENBQUMsTUFBTSwwQkFBYSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7UUFDaEMsTUFBTSxpQkFBSSxDQUFDLGNBQWMsQ0FBQyxDQUFBO0lBQzVCLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNOLE1BQU0saUJBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQTtJQUMzQixDQUFDO0FBQ0gsQ0FBQyxDQUFBLENBQUE7QUFFRCxJQUFJLE9BQU8sR0FBRztJQUNaLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLHFCQUFxQixDQUFDLENBQUE7SUFDN0MsTUFBTSxpQkFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFBO0FBQ3hCLENBQUMsQ0FBQSxDQUFBO0FBRUQsSUFBSSxVQUFVLEdBQUc7SUFDZixNQUFNLENBQUMsTUFBTSxnQkFBZ0IsQ0FBQyxlQUFlLEVBQUU7U0FDNUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLG9CQUFvQixDQUFDO1NBQzNDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxlQUFlLENBQUMsQ0FBQTtBQUMzQyxDQUFDLENBQUEsQ0FBQSJ9 \ No newline at end of file diff --git a/ts/npmci.test.ts b/ts/npmci.test.ts index cddd102..dda0140 100644 --- a/ts/npmci.test.ts +++ b/ts/npmci.test.ts @@ -1,5 +1,5 @@ import * as plugins from './npmci.plugins' -import { bash } from './npmci.bash' +import { bash, yarnAvailable } from './npmci.bash' import { install } from './npmci.install' import * as env from './npmci.env' import * as NpmciBuildDocker from './npmci.build.docker' @@ -14,9 +14,13 @@ export let test = async (versionArg): Promise => { } } -let npmDependencies = async ():Promise => { +let npmDependencies = async (): Promise => { plugins.beautylog.info('now installing dependencies:') - await bash('npm install') + if (await yarnAvailable.promise) { + await bash('yarn install') + } else { + await bash('npm install') + } } let npmTest = async (): Promise => {