@dsh-workbench/adapter-probe 1.1.14 → 1.1.15

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.
@@ -1,6 +1,6 @@
1
1
  import { homedir } from 'node:os';
2
2
  import { isolatedRoot } from '@dsh-workbench/adapter-runtime';
3
- import { bootstrapEnvOf, tailLines } from '@dsh-workbench/shared/host';
3
+ import { bootstrapEnvOf, invocationOf, tailLines } from '@dsh-workbench/shared/host';
4
4
  import { desktopRuntimeEnvPath } from './desktop-runtime.js';
5
5
  import { currentShellKind } from './platform.js';
6
6
  export function bootstrapEnv(options = {}) {
@@ -13,11 +13,6 @@ export function bootstrapEnv(options = {}) {
13
13
  path: desktopRuntimeEnvPath(parent.PATH),
14
14
  });
15
15
  }
16
- function commandArgsOf(line, shellKind) {
17
- return shellKind === 'pwsh'
18
- ? { file: 'pwsh', args: ['-NoProfile', '-NonInteractive', '-Command', line] }
19
- : { file: 'bash', args: ['-c', line] };
20
- }
21
16
  async function seamSpawn(seam, line, shellKind, env, timeoutMs) {
22
17
  if (seam === undefined)
23
18
  throw new Error('没有执行缝,自举命令起不来');
@@ -38,7 +33,7 @@ async function seamSpawn(seam, line, shellKind, env, timeoutMs) {
38
33
  export async function runBootstrapCommand(line, options) {
39
34
  const shellKind = options.shellKind ?? currentShellKind();
40
35
  const env = { ...bootstrapEnv({ shellKind }), ...(options.env ?? {}) };
41
- const command = commandArgsOf(line, shellKind);
36
+ const command = invocationOf(shellKind, line);
42
37
  try {
43
38
  const result = options.spawn === undefined
44
39
  ? await seamSpawn(options.seam, line, shellKind, env, options.timeoutMs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-workbench/adapter-probe",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "Workbench adapter-probe adapter.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,10 +14,10 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "proper-lockfile": "^4.1.2",
17
- "@dsh-workbench/adapter-profile": "1.1.14",
18
- "@dsh-workbench/shared": "1.1.14",
19
- "@dsh-workbench/adapter-runtime": "1.1.14",
20
- "@dsh-workbench/adapter-supply": "1.1.14"
17
+ "@dsh-workbench/adapter-profile": "1.1.15",
18
+ "@dsh-workbench/adapter-runtime": "1.1.15",
19
+ "@dsh-workbench/adapter-supply": "1.1.15",
20
+ "@dsh-workbench/shared": "1.1.15"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^24.19.0",