Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jan 5, 2018
1 parent 3a47fef commit 7aa5bc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lighthouse-cli/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function getFlags(manualArgv) {
'disable-cpu-throttling': 'Disable CPU throttling',
'disable-network-throttling': 'Disable network throttling',
'gather-mode':
'Collect artifacts from a connected browser and save to disk. If audit-mode is not also enabled, the run quit early.',
'Collect artifacts from a connected browser and save to disk. If audit-mode is not also enabled, the run will quit early.',
'audit-mode': 'Process saved artifacts from disk',
'save-assets': 'Save the trace contents & screenshots to disk',
'save-artifacts': 'Save all gathered artifacts to disk',
Expand Down
8 changes: 4 additions & 4 deletions lighthouse-cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ function handleError(err) {
* @return {!Promise<void>}
*/
function saveResults(results, artifacts, flags) {
const shouldSaveResults = flags.auditMode || (flags.gatherMode == flags.auditMode);
const cwd = process.cwd();
let promise = Promise.resolve();
if (!shouldSaveResults) return promise;

const cwd = process.cwd();
const shouldSaveResults = flags.auditMode || (flags.gatherMode === flags.auditMode);
if (!shouldSaveResults) return promise;

// Use the output path as the prefix for all generated files.
// If no output path is set, generate a file prefix using the URL and date.
Expand Down Expand Up @@ -162,7 +162,7 @@ function saveResults(results, artifacts, flags) {
function runLighthouse(url, flags, config) {
/** @type {!LH.LaunchedChrome} */
let launchedChrome;
const shouldGather = flags.gatherMode || flags.gatherMode == flags.auditMode;
const shouldGather = flags.gatherMode || flags.gatherMode === flags.auditMode;
/** @type {!Promise<!LH.Results|void>} */
let promise = Promise.resolve();
/** @type {!Promise<!LH.Results>|undefined} */
Expand Down

0 comments on commit 7aa5bc5

Please sign in to comment.