Skip to content

Commit 032f76a

Browse files
committed
Improve path and added logging
1 parent 7a7a48b commit 032f76a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/resources/java/jenv/jenv.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
JAVA_VERSION_INTEGER,
1010
} from './java-versions-parameter.js';
1111
import Schema from './jenv-schema.json';
12+
import os from 'node:os';
1213

1314
export interface JenvConfig extends ResourceConfig {
1415
add?: string[],
@@ -50,13 +51,15 @@ export class JenvResource extends Resource<JenvConfig> {
5051
override async refresh(): Promise<Partial<JenvConfig> | null> {
5152
const $ = getPty();
5253

54+
console.log('Zshrc', fs.readFileSync(`${os.homedir}/.zshrc`, 'utf8'));
55+
console.log('Path', (await $.spawnSafe('echo $PATH')).data);
56+
57+
5358
const jenvQuery = await $.spawnSafe('which jenv')
5459
if (jenvQuery.status === SpawnStatus.ERROR) {
5560
return null
5661
}
5762

58-
console.log('Zshrc', fs.readFileSync('~/.zshrc', 'utf8'));
59-
6063
// For some reason jenv doctor will return with a non-zero status code even
6164
// if it's successful. We can ignore the status code and only check for the text
6265
const jenvDoctor = await $.spawnSafe('jenv doctor')

0 commit comments

Comments
 (0)