ramm 0.0.49 → 0.0.51

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.
package/dist/ramm.js CHANGED
@@ -103,12 +103,12 @@ var execCommandRaw = async (command, { store = {}, signal, env, cwd, prefix = ""
103
103
  spawnResult
104
104
  };
105
105
  };
106
- var execCommandMayError = async (command, props) => {
106
+ var execCommandMayError = async (command, props, context) => {
107
107
  printCommand(command);
108
- return execCommandRaw(command, props);
108
+ return execCommandRaw(command, props, context);
109
109
  };
110
110
  var execCommand = async (command, props, context) => {
111
- const result = await execCommandMayError(command, props);
111
+ const result = await execCommandMayError(command, props, context);
112
112
  if (result.spawnResult.exitCode !== 0) {
113
113
  console.error(`Error exit code: ${result.spawnResult.exitCode}`);
114
114
  console.error(`Command: ${command}`);
@@ -137,8 +137,8 @@ var {$ } = globalThis.Bun;
137
137
  var dnf_os = ["rocky", "fedora", "alma"];
138
138
  var installSystemPackage = async (packageName, context) => {
139
139
  const osName = (await $`cat /etc/os-release | grep ^ID= | cut -d'=' -f2`.text()).trim();
140
- const checkWhich = await $`which ${packageName}`;
141
- if (checkWhich.exitCode !== 0) {
140
+ const checkResult = await execCommandMayError(`which ${packageName}`, {}, context);
141
+ if (checkResult.spawnResult.exitCode !== 0) {
142
142
  return;
143
143
  }
144
144
  if (osName === "ubuntu") {
@@ -16,7 +16,7 @@ export declare const execCommandRaw: (command: string, { store, signal, env, cwd
16
16
  stdout: string;
17
17
  spawnResult: Subprocess<"inherit", "pipe", "pipe">;
18
18
  }>;
19
- export declare const execCommandMayError: (command: string, props: ExecProps) => Promise<{
19
+ export declare const execCommandMayError: (command: string, props: ExecProps, context?: Context) => Promise<{
20
20
  stderr: string;
21
21
  stdout: string;
22
22
  spawnResult: Subprocess<"inherit", "pipe", "pipe">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ramm",
3
3
  "type": "module",
4
- "version": "0.0.49",
4
+ "version": "0.0.51",
5
5
  "scripts": {
6
6
  "build": "bun build ./src/ramm.ts --target bun --outdir ./dist && cp ./src/bun.sh ./dist/bun.sh",
7
7
  "types": "tsc --project tsconfig.types.json"