-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from Cyberbeni/deprecation-fix
fix rmdir being deprecated
- Loading branch information
Showing
5 changed files
with
1,232 additions
and
1,265 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import * as fs from 'fs' | |
import * as os from 'os' | ||
import * as semver from 'semver' | ||
|
||
import { exec, getUuid, logError, supportedBuildOptions } from './helpers' | ||
import { exec, getUuid, logError } from './helpers' | ||
|
||
export class SwiftToolInstaller { | ||
// Input | ||
|
@@ -97,8 +97,7 @@ export class SwiftToolInstaller { | |
// They didn't make any difference when building SwiftLint | ||
// '--disable-automatic-resolution' caused build error on Linux for realm/[email protected]: | ||
// 'cannot update Package.resolved file because automatic resolution is disabled' | ||
const additionalOptions = await supportedBuildOptions(['--disable-sandbox']) | ||
await exec('swift', ['build', '--package-path', this.workingDirectory, '--configuration', 'release'].concat(additionalOptions)) | ||
await exec('swift', ['build', '--package-path', this.workingDirectory, '--configuration', 'release', '--disable-sandbox']) | ||
}) | ||
} | ||
|
||
|
@@ -110,7 +109,7 @@ export class SwiftToolInstaller { | |
const itemPath = `${this.productDirectory}/${itemName}` | ||
try { | ||
if (fs.lstatSync(itemPath).isDirectory()) { | ||
fs.rmdirSync(itemPath, { recursive: true }) | ||
fs.rmSync(itemPath, { recursive: true }) | ||
} else { | ||
fs.accessSync(itemPath, fs.constants.X_OK) | ||
} | ||
|
Oops, something went wrong.