Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly detect directories and files in GitHub Release task #9877

Merged
merged 1 commit into from
Mar 20, 2019
Merged

Correctly detect directories and files in GitHub Release task #9877

merged 1 commit into from
Mar 20, 2019

Conversation

jessehouwing
Copy link
Contributor

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.

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.
@@ -53,7 +53,7 @@ export class Utility {

public static isPatternADirectory(assets: string[], pattern: string): boolean {
if (assets && assets.length === 1 && pattern) {
if (path.resolve(assets[0]) === path.resolve(pattern)) {
if ((path.resolve(assets[0]) === path.resolve(pattern)) && tl.exist(path.resolve(pattern)) && tl.stats(path.resolve(pattern)).isDirectory()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change

@mdmdakbar mdmdakbar merged commit 8e4f395 into microsoft:master Mar 20, 2019
mdmdakbar pushed a commit that referenced this pull request Mar 20, 2019
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.
mdmdakbar pushed a commit that referenced this pull request Mar 20, 2019
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.
mdmdakbar pushed a commit that referenced this pull request Mar 20, 2019
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.
mdmdakbar added a commit that referenced this pull request Mar 25, 2019
* 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
mdmdakbar added a commit that referenced this pull request Mar 25, 2019
* 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.

* Updating task version

* version change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants