Skip to content

Commit aafacf4

Browse files
authored
Users/mdakbar/bug fix148 (#9888)
* Correctly detect directories (#9877) If you specify a direct path to a file, it should just attach the file. Given that the pattern is the same as the path in that case it currently fails. * Version update
1 parent 700aef7 commit aafacf4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Tasks/GitHubReleaseV0/operations/Utility.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class Utility {
5353

5454
public static isPatternADirectory(assets: string[], pattern: string): boolean {
5555
if (assets && assets.length === 1 && pattern) {
56-
if (path.resolve(assets[0]) === path.resolve(pattern)) {
56+
if ((path.resolve(assets[0]) === path.resolve(pattern)) && tl.exist(path.resolve(pattern)) && tl.stats(path.resolve(pattern)).isDirectory()) {
5757
tl.debug("Pattern is a directory " + pattern);
5858
return true;
5959
}

Tasks/GitHubReleaseV0/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"version": {
1616
"Major": 0,
1717
"Minor": 149,
18-
"Patch": 0
18+
"Patch": 2
1919
},
2020
"demands": [],
2121
"minimumAgentVersion": "2.0.0",

Tasks/GitHubReleaseV0/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"version": {
1616
"Major": 0,
1717
"Minor": 149,
18-
"Patch": 0
18+
"Patch": 2
1919
},
2020
"demands": [],
2121
"minimumAgentVersion": "2.0.0",

0 commit comments

Comments
 (0)