File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
packages/flutter_tools/lib/src/base Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,14 @@ import 'platform.dart';
7
7
8
8
/// Return the absolute path of the user's home directory
9
9
String get homeDirPath {
10
- if (_homeDirPath == null ) {
11
- _homeDirPath = platform.isWindows
12
- ? platform.environment['USERPROFILE' ]
13
- : platform.environment['HOME' ];
14
- if (_homeDirPath != null )
15
- _homeDirPath = fs.path.absolute (_homeDirPath);
10
+ String path = platform.isWindows
11
+ ? platform.environment['USERPROFILE' ]
12
+ : platform.environment['HOME' ];
13
+ if (path != null ) {
14
+ path = fs.path.absolute (path);
16
15
}
17
- return _homeDirPath ;
16
+ return path ;
18
17
}
19
- String _homeDirPath;
20
18
21
19
/// Throw a specialized exception for expected situations
22
20
/// where the tool should exit with a clear message to the user
You can’t perform that action at this time.
0 commit comments