Skip to content

Commit

Permalink
Improve script
Browse files Browse the repository at this point in the history
  • Loading branch information
erikhellq committed Jul 25, 2022
1 parent 4d8d0b7 commit cbe6ffc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Transfer photos and files to any device.
### Run project
- Create a .env file by copying the .env.sample file
- Run dart tools/scripts.dart app_env to get a env.dart file
- Run `flutter run`
- Run app using editor or `flutter run`

### Contribute
Contributions are very much welcome on everything from bug reports to feature development. If you
Expand Down
7 changes: 6 additions & 1 deletion tools/tools_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ class Config {
}

static Map<String, String> _parseEnv() {
var content = File('${Config.localRepoPath}/.env').readAsStringSync();
var repoPath = Config.localRepoPath;
if (Platform.isWindows && repoPath.startsWith('/')) {
repoPath = repoPath.substring(1);
}

var content = File('$repoPath/.env').readAsStringSync();
Map<String, String> values = {};
for (var line in content.split('\n')) {
if (line.trim().isEmpty) continue;
Expand Down

0 comments on commit cbe6ffc

Please sign in to comment.