Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update generateLockFileCommand
  • Loading branch information
cperaltah committed Aug 3, 2024
commit 71f54e165b886ed626394d52c0fb3954e388103c
5 changes: 2 additions & 3 deletions tools/tsp-client/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,14 @@ export async function convertCommand(argv: any): Promise<void> {

export async function generateLockFileCommand(argv: any) {
const outputDir = argv["output-dir"];
let rootUrl = resolvePath(outputDir);
const repoRoot = await getRepoRoot(rootUrl);
const repoRoot = await getRepoRoot(outputDir);

Logger.info("Generating lock file...");
const args: string[] = ["install"];
if (process.env["TSPCLIENT_FORCE_INSTALL"]?.toLowerCase() === "true") {
args.push("--force");
}
const tempRoot = await createTempDirectory(rootUrl);
const tempRoot = await createTempDirectory(outputDir);
await cp(joinPaths(repoRoot, "eng", "emitter-package.json"), joinPaths(tempRoot, "package.json"));
await npmCommand(tempRoot, args);
const lockFile = await stat(joinPaths(tempRoot, "package-lock.json"));
Expand Down