Skip to content

Commit 685aa06

Browse files
authored
revert changes to fix ci failure (#8217)
1 parent 926f0ed commit 685aa06

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

tools/js-sdk-release-tools/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/js-sdk-release-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure-tools/js-sdk-release-tools",
3-
"version": "2.7.7",
3+
"version": "2.7.8",
44
"description": "",
55
"scripts": {
66
"start": "node dist/changelogToolCli.js",

tools/js-sdk-release-tools/src/utils/backupNodeModules.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export async function backupNodeModules(folder: string) {
1414

1515
export async function restoreNodeModules(folder: string) {
1616
const nodeModulesPath = path.join(folder, "node_modules_backup");
17-
if (!fs.existsSync(nodeModulesPath) || '/' === path.dirname(folder)) {
18-
return;
17+
if (fs.existsSync(nodeModulesPath)) {
18+
logger.logGreen(`rename ${nodeModulesPath} to ${nodeModulesPath.replace('_backup', '')}`);
19+
fs.renameSync(nodeModulesPath, `${nodeModulesPath.replace('_backup', '')}`);
1920
}
20-
logger.logGreen(`rename ${nodeModulesPath} to ${nodeModulesPath.replace('_backup', '')}`);
21-
fs.renameSync(nodeModulesPath, `${nodeModulesPath.replace('_backup', '')}`);
21+
if ('/' === path.dirname(folder)) return;
2222
await restoreNodeModules(path.dirname(folder));
2323
}

0 commit comments

Comments
 (0)