Skip to content

Commit

Permalink
fix(@angular/cli): Correct service worker error message
Browse files Browse the repository at this point in the history
Fixes #8490
  • Loading branch information
Brocco authored and hansl committed Nov 23, 2017
1 parent b056b1d commit 233338f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/@angular/cli/utilities/service-worker/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Filesystem } from '@angular/service-worker/config';
import { stripIndent } from 'common-tags';
import { oneLine } from 'common-tags';
import * as crypto from 'crypto';
import * as fs from 'fs';
import * as path from 'path';
Expand Down Expand Up @@ -71,9 +71,9 @@ export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string
const configPath = path.resolve(appRoot, 'ngsw-config.json');

if (!fs.existsSync(configPath)) {
throw new Error(stripIndent`Expected to find an ngsw-config.json configuration file in the
application root. Either provide one or disable Service Worker
build support in angular-cli.json.`);
throw new Error(oneLine`Error: Expected to find an ngsw-config.json configuration
file in the ${appRoot} folder. Either provide one or disable Service Worker
in .angular-cli.json.`);
}
const config = fs.readFileSync(configPath, 'utf8');

Expand Down

0 comments on commit 233338f

Please sign in to comment.