Skip to content

Commit 74ace6b

Browse files
committed
fix: wrong check for watchapp folder
1 parent 2e5a7e9 commit 74ace6b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/services/ios-watch-app-service.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ export class IOSWatchAppService extends NativeTargetServiceBase implements IIOSW
1313

1414
public async addWatchAppFromPath({watchAppFolderPath, projectData, platformData, pbxProjPath}: IAddWatchAppFromPathOptions): Promise<boolean> {
1515
const targetUuids: string[] = [];
16+
const appPath = path.join(watchAppFolderPath, IOS_WATCHAPP_FOLDER);
17+
const extensionPath = path.join(watchAppFolderPath, IOS_WATCHAPP_EXTENSION_FOLDER);
1618

17-
if (!this.$fs.exists(watchAppFolderPath)) {
19+
if (!this.$fs.exists(appPath) || !this.$fs.exists(extensionPath)) {
1820
return false;
1921
}
2022

21-
const appPath = path.join(watchAppFolderPath, IOS_WATCHAPP_FOLDER);
2223
const appFolder = this.getTargetDirectories(appPath)[0];
23-
24-
const extensionPath = path.join(watchAppFolderPath, IOS_WATCHAPP_EXTENSION_FOLDER);
2524
const extensionFolder = this.getTargetDirectories(extensionPath)[0];
2625

2726
const project = new this.$xcode.project(pbxProjPath);

0 commit comments

Comments
 (0)