Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrevert "🏗 Update @percy/percy-puppeteer to v1.x (#25176)" #25221

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ test/coverage
*.swp
*.swo
yarn-error.log
PERCY_BUILD_ID
chromedriver.log
sc-*-linux*
sc-*-osx*
sauce_connect_*
Expand Down
7 changes: 3 additions & 4 deletions build-system/common/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

const childProcess = require('child_process');

const shellCmd = process.platform == 'win32' ? 'cmd' : '/bin/sh';
const shellFlag = process.platform == 'win32' ? '/C' : '-c';
const shellCmd = process.platform == 'win32' ? 'cmd' : '/bin/bash';

/**
* Spawns the given command in a child process with the given options.
Expand All @@ -32,7 +31,7 @@ const shellFlag = process.platform == 'win32' ? '/C' : '-c';
* @return {!Object}
*/
function spawnProcess(cmd, options) {
return childProcess.spawnSync(shellCmd, [shellFlag, cmd], options);
return childProcess.spawnSync(cmd, Object.assign({shell: shellCmd}, options));
}

/**
Expand All @@ -56,7 +55,7 @@ function exec(cmd, options) {
* @return {!Object}
*/
function execScriptAsync(script, options) {
return childProcess.spawn(shellCmd, [shellFlag, script], options);
return childProcess.spawn(script, Object.assign({shell: shellCmd}, options));
}

/**
Expand Down
12 changes: 3 additions & 9 deletions build-system/tasks/visual-diff/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
'use strict';

const argv = require('minimist')(process.argv.slice(2));
const colors = require('ansi-colors');
const fancyLog = require('fancy-log');
const sleep = require('sleep-promise');
const {isTravisBuild} = require('../../common/travis');

const CSS_SELECTOR_RETRY_MS = 200;
const CSS_SELECTOR_RETRY_ATTEMPTS = 50;
Expand Down Expand Up @@ -54,10 +54,9 @@ function escapeHtml(html) {
function log(mode, ...messages) {
switch (mode) {
case 'verbose':
if (isTravisBuild()) {
return;
if (argv.verbose) {
fancyLog.info(colors.green('VERBOSE:'), ...messages);
}
fancyLog.info(colors.green('VERBOSE:'), ...messages);
break;
case 'info':
fancyLog.info(colors.green('INFO:'), ...messages);
Expand All @@ -72,11 +71,6 @@ function log(mode, ...messages) {
process.exitCode = 1;
fancyLog.error(colors.red('FATAL:'), ...messages);
throw new Error(messages.join(' '));
case 'travis':
if (isTravisBuild()) {
messages.forEach(message => process.stdout.write(message));
}
break;
}
}

Expand Down
Loading