Skip to content

Commit 8fce1b1

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
* Use path.resolve for frameworkPath
* Don't delete frameworkPath directory
1 parent 62f1d9f commit 8fce1b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/platform-service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export class PlatformService implements IPlatformService {
7474

7575
var downloadedPackagePath = this.$npm.install(packageToInstall, npmOptions).wait();
7676
var frameworkDir = path.join(downloadedPackagePath, constants.PROJECT_FRAMEWORK_FOLDER_NAME);
77+
frameworkDir = path.resolve(frameworkDir);
7778

7879
try {
7980
this.addPlatformCore(platformData, frameworkDir).wait();
@@ -92,7 +93,7 @@ export class PlatformService implements IPlatformService {
9293
platformData.platformProjectService.createProject(platformData.projectRoot, frameworkDir).wait();
9394
var installedVersion = this.$fs.readJson(path.join(frameworkDir, "../", "package.json")).wait().version;
9495

95-
if(options.frameworkPath && !options.symlink) {
96+
if(options.frameworkPath && this.$fs.getFsStats(options.frameworkPath).wait().isFile() && !options.symlink) {
9697
// Need to remove unneeded node_modules folder
9798
// One level up is the runtime module and one above is the node_modules folder.
9899
this.$fs.deleteDirectory(path.join(frameworkDir, "../../")).wait();

0 commit comments

Comments
 (0)