Skip to content

Commit

Permalink
Fix add -u command re-resolving relative paths
Browse files Browse the repository at this point in the history
Tracked filepaths were undergoing relative path resolution twice
  • Loading branch information
gobisaTS committed Oct 25, 2022
1 parent 5676c75 commit b411859
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions node/lib/cmd/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ exports.executeableSubcommand = co.wrap(function *(args) {
`${colors.yellow("hint: Maybe you wanted to say ")}` +
`${colors.yellow("'git meta add .'?")}\n`;
process.stdout.write(text);
return;
}
}

const paths = userPaths.map(filename => {
return GitUtil.resolveRelativePath(workdir, cwd, filename);
});
yield Add.stagePaths(repo, paths, args.meta, args.update);
else {
userPaths = args.paths.map(filename => {
return GitUtil.resolveRelativePath(workdir, cwd, filename);
});
}
yield Add.stagePaths(repo, userPaths, args.meta, args.update);
});

0 comments on commit b411859

Please sign in to comment.