Skip to content

Commit 3557378

Browse files
Fix fs copyFile when source and target are the same
When source and target file are the same, copyFile produces empty file. Add check and if they are the same, do not execute any action. Move fs tests from appbuilder-cli to common. Add tests for copyFile.
1 parent 10dc999 commit 3557378

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/stubs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ export class FileSystemStub implements IFileSystem {
164164
readStdin(): IFuture<string> {
165165
return undefined;
166166
}
167+
168+
renameIfExists(oldPath: string, newPath: string): IFuture<boolean> {
169+
return undefined;
170+
}
167171
}
168172

169173
export class ErrorsStub implements IErrors {

0 commit comments

Comments
 (0)