Skip to content

Commit 3c41cfc

Browse files
committed
Added logging for shell info
1 parent 0b42ca1 commit 3c41cfc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/resources/shell/path/path-resource.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import path from 'node:path';
1818

1919
import { untildify } from '../../../utils/untildify.js';
2020
import Schema from './path-schema.json';
21+
import os from 'node:os';
2122

2223
export interface PathConfig extends StringIndexedObject {
2324
path: string;
@@ -188,6 +189,9 @@ export class PathResource extends Resource<PathConfig> {
188189
if (pc.name !== 'paths') {
189190
return;
190191
}
192+
193+
console.log('My shell', process.env.SHELL);
194+
console.log('Other shell method', os.userInfo().shell)
191195

192196
const pathsToAdd = pc.newValue.filter((p: string) => !pc.previousValue.includes(p));
193197
const pathsToRemove = pc.previousValue.filter((p: string) => !pc.newValue.includes(p));
@@ -216,7 +220,7 @@ export class PathResource extends Resource<PathConfig> {
216220

217221
private async addPath(path: string, prepend = false): Promise<void> {
218222
// Escaping is done within file utils
219-
await FileUtils.addPathToPrimaryShellRc(path, prepend);
223+
await FileUtils.addPathToShellRc(path, prepend);
220224
}
221225

222226
private async removePath(pathValue: string): Promise<void> {

0 commit comments

Comments
 (0)