You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"test:no-coverage": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-deprecation --max-old-space-size=10240\" npx jest --logHeapUsage --workerIdleMemoryLimit=1.5G",
44
44
"test:fast": "npm run test -- --testPathIgnorePatterns=template_rendering.test.ts --testPathIgnorePatterns=e2e_parse_command_swift.test.ts --testPathIgnorePatterns=e2e_wizard_swift.test.ts",
@@ -47,7 +47,7 @@
47
47
"test:swift": "npm run test -- --runInBand --testPathPattern=e2e_parse_command_swift.test.ts --testPathPattern=e2e_wizard_swift.test.ts --testPathPattern=e2e_parse_command_swift_xcodeproj.test.ts",
48
48
"test:non-mac": "npm run test -- --testPathIgnorePatterns=e2e_parse_command_swift.test.ts --testPathIgnorePatterns=e2e_wizard_swift.test.ts --testPathIgnorePatterns=e2e_parse_command_swift_xcodeproj.test.ts",
Copy file name to clipboardExpand all lines: cli/src/connect/__test__/e2e/e2e_parse_command/swift_parser/swift_parser.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
return `swift run --package-path ${await getSwiftParserDir(cwd, (config as any).xcodeprojPath, (config as any).swiftPackagePath)} figma-swift`
34
+
return `swift run --package-path ${await getSwiftParserDir(cwd, (config as any).xcodeprojPath, (config as any).swiftPackagePath, (config as any).sourcePackagesPath)} figma-swift`
35
35
},
36
36
},
37
37
compose: {
@@ -87,10 +87,19 @@ export async function callParser(
// We can't proceed without the project name (however, this should always exist)
104
+
if (!projectName) {
105
+
exitWithError('PROJECT_NAME not found in xcodebuild output')
106
+
}
107
+
108
+
// 1. From the folders in the user library directory use a regex to determine the folder name of the project defined by "ProjectName-" and a 28 character hash
109
+
// e.g. project-fbybcbnivxfbfeefownexgukzwxd
110
+
if (userLibraryDirectory) {
111
+
// Default to Xcode's default Dervied Data location (e.g. ~/Users/{username}/Library/Developer/Xcode/DerivedData/project-fbybcbnivxfbfeefownexgukzwxd/SourcePackages)
// Directory is not writable, attempt to make it writable
212
+
spawnSync('chmod', ['-R', '755', packageFile])
213
+
}
214
+
logger.info(`Directory enabled for swift run command`)
215
+
} catch (e) {
216
+
logger.warn(`Unable to verify or modify directory permissions: ${e}`)
217
+
}
218
+
131
219
logger.info(
132
220
`Found Code Connect Swift package at ${figmaPackageDir}, building parser binary. This may take a few minutes if this is the first time you've run Code Connect.`,
0 commit comments