File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/@angular/cli/tasks Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 11import * as rimraf from 'rimraf' ;
22import * as path from 'path' ;
33const Task = require ( '../ember-cli/lib/models/task' ) ;
4+ const SilentError = require ( 'silent-error' ) ;
45import * as webpack from 'webpack' ;
56import { BuildTaskOptions } from '../commands/build' ;
67import { NgCliWebpackConfig } from '../models/webpack-config' ;
@@ -14,6 +15,9 @@ export default Task.extend({
1415 const project = this . cliProject ;
1516
1617 const outputPath = runTaskOptions . outputPath || CliConfig . fromProject ( ) . config . apps [ 0 ] . outDir ;
18+ if ( project . root === outputPath ) {
19+ throw new SilentError ( 'Output path MUST not be project root directory!' ) ;
20+ }
1721 rimraf . sync ( path . resolve ( project . root , outputPath ) ) ;
1822
1923 const webpackConfig = new NgCliWebpackConfig ( runTaskOptions ) . config ;
You can’t perform that action at this time.
0 commit comments