@codifycli/plugin-core 1.1.0-beta6 → 1.1.0-beta7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import * as fsSync from 'node:fs';
3
3
  import * as fs from 'node:fs/promises';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
6
- import { SpawnStatus, getPty } from '../pty/index.js';
6
+ import { getPty, SpawnStatus } from '../pty/index.js';
7
7
  export function isDebug() {
8
8
  return process.env.DEBUG != null && process.env.DEBUG.includes('codify'); // TODO: replace with debug library
9
9
  }
@@ -56,7 +56,7 @@ export const Utils = {
56
56
  return query.status === SpawnStatus.SUCCESS;
57
57
  },
58
58
  getShell() {
59
- const shell = process.env.SHELL || '';
59
+ const shell = process.env.SHELL || os.userInfo().shell || '';
60
60
  if (shell.endsWith('bash')) {
61
61
  return Shell.BASH;
62
62
  }
@@ -81,7 +81,7 @@ export const Utils = {
81
81
  return this.getShellRcFiles()[0];
82
82
  },
83
83
  getShellRcFiles() {
84
- const shell = process.env.SHELL || '';
84
+ const shell = process.env.SHELL || os.userInfo().shell || '';
85
85
  const homeDir = os.homedir();
86
86
  if (shell.endsWith('bash')) {
87
87
  // Linux typically uses .bashrc, macOS uses .bash_profile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codifycli/plugin-core",
3
- "version": "1.1.0-beta6",
3
+ "version": "1.1.0-beta7",
4
4
  "description": "TypeScript library for building Codify plugins to manage system resources (applications, CLI tools, settings) through infrastructure-as-code",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -4,7 +4,7 @@ import * as fs from 'node:fs/promises';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
6
6
 
7
- import { SpawnStatus, getPty } from '../pty/index.js';
7
+ import { getPty, SpawnStatus } from '../pty/index.js';
8
8
 
9
9
  export function isDebug(): boolean {
10
10
  return process.env.DEBUG != null && process.env.DEBUG.includes('codify'); // TODO: replace with debug library
@@ -73,7 +73,7 @@ export const Utils = {
73
73
  },
74
74
 
75
75
  getShell(): Shell | undefined {
76
- const shell = process.env.SHELL || '';
76
+ const shell = process.env.SHELL || os.userInfo().shell || '';
77
77
 
78
78
  if (shell.endsWith('bash')) {
79
79
  return Shell.BASH
@@ -108,7 +108,7 @@ export const Utils = {
108
108
  },
109
109
 
110
110
  getShellRcFiles(): string[] {
111
- const shell = process.env.SHELL || '';
111
+ const shell = process.env.SHELL || os.userInfo().shell || '';
112
112
  const homeDir = os.homedir();
113
113
 
114
114
  if (shell.endsWith('bash')) {