File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/features/terminal/startup Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ async function isNuShellInstalled(): Promise<boolean> {
2424
2525async function getDefaultConfigPath ( ) : Promise < string | undefined > {
2626 try {
27- const configPath = await runCommand ( 'nu -c $nu.default-config-dir' ) ;
27+ const configPath = await runCommand (
28+ isWindows ( ) ? 'nu -c $nu.default-config-dir' : 'nu -c \\$nu.default-config-dir' ,
29+ ) ;
2830
2931 return configPath ? configPath . trim ( ) : undefined ;
3032 } catch ( err ) {
@@ -36,9 +38,10 @@ async function getDefaultConfigPath(): Promise<string | undefined> {
3638async function getNuShellProfile ( ) : Promise < string > {
3739 const pathsToCheck : string [ ] = [ ] ;
3840
39- const defaultConfigPath = await getDefaultConfigPath ( ) ;
41+ let defaultConfigPath = await getDefaultConfigPath ( ) ;
4042 if ( defaultConfigPath ) {
41- pathsToCheck . push ( path . join ( defaultConfigPath , 'config.nu' ) ) ;
43+ defaultConfigPath = path . join ( defaultConfigPath , 'config.nu' ) ;
44+ return defaultConfigPath ;
4245 }
4346
4447 if ( isWindows ( ) ) {
You can’t perform that action at this time.
0 commit comments