File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
packages/@angular/cli/commands Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,18 @@ export default class UpdateCommand extends SchematicCommand {
39
39
}
40
40
41
41
public async run ( options : UpdateOptions ) {
42
+ const schematicOptions : any = { ...options } ;
43
+ if ( schematicOptions . _ [ 0 ] == '@angular/cli'
44
+ && ! schematicOptions . migrateOnly
45
+ && ! schematicOptions . from ) {
46
+ schematicOptions . migrateOnly = true ;
47
+ schematicOptions . from = '1.0.0' ;
48
+ }
49
+
42
50
return this . runSchematic ( {
43
51
collectionName : this . collectionName ,
44
52
schematicName : this . schematicName ,
45
- schematicOptions : options ,
53
+ schematicOptions,
46
54
dryRun : options . dryRun ,
47
55
force : false ,
48
56
showNothingDone : false ,
Original file line number Diff line number Diff line change
1
+ import { createProjectFromAsset } from '../../utils/assets' ;
2
+ import { expectToFail } from '../../utils/utils' ;
3
+ import { ng } from '../../utils/process' ;
4
+
5
+
6
+ export default function ( ) {
7
+ return Promise . resolve ( )
8
+ . then ( ( ) => createProjectFromAsset ( '1.7-project' ) )
9
+ . then ( ( ) => expectToFail ( ( ) => ng ( 'build' ) ) )
10
+ . then ( ( ) => ng ( 'update' , '@angular/cli' ) )
11
+ . then ( ( ) => ng ( 'build' ) ) ;
12
+ }
You can’t perform that action at this time.
0 commit comments