Skip to content

Commit cfa6d9a

Browse files
Change setting of profile-dir
Update common lib where the following change is applied: DefaultValue is passed to the setProfileDir method. Different CLI-s have different defaultProfileDirs. setProfileDir method will use the passed on the command line profile-dir or the default one passed as parameter to the function.
1 parent 7844f2c commit cfa6d9a

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

lib/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var knownOpts:any = {
2323
_.extend(knownOpts, commonOptions.knownOpts);
2424
_.extend(shorthands, commonOptions.shorthands);
2525

26-
commonOptions.setProfileDir(".nativescript-cli");
26+
commonOptions.setProfileDir(path.join(osenv.home(), ".nativescript-cli"));
2727
var parsed = helpers.getParsedOptions(knownOpts, shorthands);
2828

2929
Object.keys(parsed).forEach((opt) => exports[opt] = parsed[opt]);

test/stubs.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ export class FileSystemStub implements IFileSystem {
119119
symlink(sourePath: string, destinationPath: string): IFuture<void> {
120120
return undefined;
121121
}
122+
123+
closeStream(stream: any): IFuture<void> {
124+
return undefined;
125+
}
126+
127+
setCurrentUserAsOwner(path: string, owner: string): IFuture<void> {
128+
return undefined;
129+
}
122130
}
123131

124132
export class ErrorsStub implements IErrors {

0 commit comments

Comments
 (0)