File tree 1 file changed +4
-0
lines changed
packages/@angular/cli/tasks
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 1
1
import * as rimraf from 'rimraf' ;
2
2
import * as path from 'path' ;
3
3
const Task = require ( '../ember-cli/lib/models/task' ) ;
4
+ const SilentError = require ( 'silent-error' ) ;
4
5
import * as webpack from 'webpack' ;
5
6
import { BuildTaskOptions } from '../commands/build' ;
6
7
import { NgCliWebpackConfig } from '../models/webpack-config' ;
@@ -14,6 +15,9 @@ export default Task.extend({
14
15
const project = this . cliProject ;
15
16
16
17
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
+ }
17
21
rimraf . sync ( path . resolve ( project . root , outputPath ) ) ;
18
22
19
23
const webpackConfig = new NgCliWebpackConfig ( runTaskOptions ) . config ;
You can’t perform that action at this time.
0 commit comments