-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat] Add support for .xcode.env file in init and doctor commands
- Loading branch information
Riccardo Cipolleschi
committed
Apr 6, 2022
1 parent
e044e7b
commit 5d2ce3b
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {HealthCheckInterface} from '../../types'; | ||
import fs from "fs"; | ||
import { promisify } from 'util'; | ||
|
||
export default { | ||
label: '.xcode.env', | ||
description: 'File to customize Xcode environment', | ||
getDiagnostics: async () => { | ||
return { | ||
needsToBeFixed: fs.existsSync("./ios/.xcode.env") | ||
}; | ||
}, | ||
runAutomaticFix: async () => { | ||
const filePath = '/ios/.xcode.env'; | ||
const src = "./node_modules/react-native/template" + filePath; | ||
const dest = "." + filePath; | ||
|
||
const copyFileAsync = promisify(fs.copyFile); | ||
await copyFileAsync(src, dest); | ||
}, | ||
} as HealthCheckInterface; |
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