Skip to content

Commit

Permalink
feat: os check for linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
jrk94 committed Sep 30, 2024
1 parent 89da70a commit 60d9e26
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion generators/packagePacker/packagePacker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { container } from "./inversify.config";
import { spawnSync } from "child_process";
import * as io from "fs-extra";
import * as path from "path";
import * as os from "node:os";
import { Configuration, Action, ActionType, Addon, ComponentType } from "./configuration";
const ncc = require("@vercel/ncc");
import { DriverTemplatesProcessor } from "./processors/driverTemplates";
Expand Down Expand Up @@ -245,7 +246,12 @@ export class PackagePacker {
// Create Package and place it in the destination
if (destination !== "") {
this.createDirectory(destination);
this.run("npm.cmd", ["pack"], temp);

if (os.platform() === "win32") {
this.run("npm.cmd", ["pack"], temp);
} else {
this.run("npm", ["pack"], temp);
}
for (let packedPackage of this.findByExtension(temp, "*.tgz")) {
this.moveFile(packedPackage, temp, destination);
}
Expand Down

0 comments on commit 60d9e26

Please sign in to comment.