File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -459,7 +459,12 @@ fn set_sdk_path(path: PathBuf, do_move: bool) {
459
459
let old = std:: env:: var ( "GEODE_SDK" ) . map ( PathBuf :: from)
460
460
. expect ( "Cannot locate SDK." ) ;
461
461
462
- assert ! ( old. is_dir( ) , "Internal Error: $GEODE_SDK doesn't point to a directory. Please reinstall the Geode SDK" ) ;
462
+ assert ! ( old. is_dir( ) ,
463
+ "Internal Error: GEODE_SDK doesn't point to a directory ({}). This \
464
+ might be caused by having run `geode sdk set-path` - try restarting \
465
+ your terminal / computer, or reinstall using `geode sdk install --reinstall`",
466
+ old. display( )
467
+ ) ;
463
468
assert ! ( old. join( "VERSION" ) . exists( ) , "Internal Error: $GEODE_SDK/VERSION not found. Please reinstall the Geode SDK." ) ;
464
469
assert ! ( !path. exists( ) , "Cannot move SDK to existing path {}" , path. to_str( ) . unwrap( ) ) ;
465
470
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl Config {
140
140
. borrow ( )
141
141
}
142
142
143
- pub fn try_sdk_path ( ) -> Result < PathBuf , & ' static str > {
143
+ pub fn try_sdk_path ( ) -> Result < PathBuf , String > {
144
144
let sdk_var = std:: env:: var ( "GEODE_SDK" )
145
145
. map_err ( |_|
146
146
"Unable to find Geode SDK (GEODE_SDK isn't set). Please install \
@@ -152,11 +152,17 @@ impl Config {
152
152
153
153
let path = PathBuf :: from ( sdk_var) ;
154
154
if !path. is_dir ( ) {
155
- return Err ( "Internal Error: GEODE_SDK doesn't point to a directory. Fix it manually or reinstall using `geode sdk install --reinstall`" ) ;
155
+ return Err ( format ! (
156
+ "Internal Error: GEODE_SDK doesn't point to a directory ({}). This \
157
+ might be caused by having run `geode sdk set-path` - try restarting \
158
+ your terminal / computer, or reinstall using `geode sdk install --reinstall`",
159
+ path. display( )
160
+ ) ) ;
156
161
}
157
162
if !path. join ( "VERSION" ) . exists ( ) {
158
163
return Err (
159
- "Internal Error: GEODE_SDK/VERSION not found. Please reinstall the Geode SDK using `geode sdk install --reinstall`"
164
+ "Internal Error: GEODE_SDK/VERSION not found. Please reinstall \
165
+ the Geode SDK using `geode sdk install --reinstall`". into ( )
160
166
) ;
161
167
}
162
168
You can’t perform that action at this time.
0 commit comments