Skip to content

Commit 5f087b1

Browse files
committed
Don't use tl.cp to copy nuget.config, as that breaks with tfvc
1 parent 6034c6a commit 5f087b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tasks/Common/nuget-task-common/NuGetConfigHelper.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export class NuGetConfigHelper {
4444
};
4545

4646
if (this._nugetConfigPath) {
47-
tl.cp("-f", this._nugetConfigPath, this.tempNugetConfigPath);
47+
// don't use cp as that copies the read-only flag, and tfvc sets that on files
48+
let content = fs.readFileSync(this._nugetConfigPath);
49+
fs.writeFileSync(this.tempNugetConfigPath, content);
4850
}
4951
else {
5052
// small file, use writeFileSync

0 commit comments

Comments
 (0)