File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,17 @@ function promptProjectName() {
21
21
}
22
22
23
23
async function handle ( args , options , logger ) {
24
- const link = await Links . find ( { path : process . cwd ( ) } ) ;
24
+ const projectPath = process . cwd ( ) ;
25
+ const link = await Links . find ( { projectPath } ) ;
25
26
26
27
if ( link !== null ) {
27
28
logger . info ( 'This project is already linked.' ) ;
28
29
} else {
29
30
const answers = await promptProjectName ( ) ;
30
31
const data = {
31
32
name : answers . name ,
32
- projectPath : process . cwd ( ) ,
33
33
host : answers . host ,
34
+ projectPath,
34
35
} ;
35
36
const link = await Links . create ( data ) ;
36
37
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ function confirmUnlink() {
11
11
}
12
12
13
13
async function handle ( args , options , logger ) {
14
- const link = await Links . find ( { path : process . cwd ( ) } ) ;
14
+ const projectPath = process . cwd ( ) ;
15
+ const link = await Links . find ( { projectPath } ) ;
15
16
16
17
if ( link === null ) {
17
18
logger . info ( 'The project is not linked at all.' ) ;
You can’t perform that action at this time.
0 commit comments