Skip to content

Commit 06f9f28

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 06f9f28

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

lib/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ 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]);
3030
exports.knownOpts = knownOpts;
3131

3232
declare var exports:any;
33-
export = exports;
33+
export = exports;

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)