File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 5
5
} from "@angular-devkit/architect" ;
6
6
import { NodeJsSyncHost } from "@angular-devkit/core/node" ;
7
7
import deploy from "./actions" ;
8
- import { experimental , join , normalize } from "@angular-devkit/core" ;
8
+ import { experimental , normalize } from "@angular-devkit/core" ;
9
+ import * as path from "path" ;
9
10
import { getFirebaseProjectName } from "../utils" ;
10
11
11
12
// Call the createBuilder() function to create a builder. This mirrors
@@ -29,15 +30,15 @@ export default createBuilder<any>(
29
30
const project = workspace . getProject ( context . target . project ) ;
30
31
31
32
const firebaseProject = getFirebaseProjectName (
32
- workspace . root ,
33
+ context . workspaceRoot ,
33
34
context . target . project
34
35
) ;
35
36
36
37
try {
37
38
await deploy (
38
39
require ( "firebase-tools" ) ,
39
40
context ,
40
- join ( workspace . root , project . root ) ,
41
+ path . join ( context . workspaceRoot , project . root ) ,
41
42
firebaseProject
42
43
) ;
43
44
} catch ( e ) {
Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ export const projectPrompt = (projects: Project[]) => {
57
57
} ;
58
58
59
59
export function getFirebaseProjectName (
60
- projectRoot : string ,
60
+ workspaceRoot : string ,
61
61
target : string
62
62
) : string | undefined {
63
63
const { targets } : FirebaseRc = JSON . parse (
64
- readFileSync ( join ( projectRoot , ".firebaserc" ) , "UTF-8" )
64
+ readFileSync ( join ( workspaceRoot , ".firebaserc" ) , "UTF-8" )
65
65
) ;
66
66
const projects = Object . keys ( targets ! ) ;
67
67
return projects . find (
You can’t perform that action at this time.
0 commit comments