Skip to content

Fix call to 'fail' in jakefile - #23845

Merged
1 commit merged into
masterfrom
jake_fails
May 4, 2018
Merged

1 commit merged into
masterfrom
jake_fails

Conversation

@ghost

Copy link
Copy Markdown

Fixes #23147

It looks like fail doesn't work if the string contains newlines.

@ghost
ghost requested a review from Wesley Wigham (weswigham) May 2, 2018 22:47
@ghost
ghost force-pushed the jake_fails branch from cbaa423 to 982bfec Compare May 2, 2018 22:49

@weswigham Wesley Wigham (weswigham) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

...huh. looks at docs in type definition

(If it is a multi-line String, the first line will be used as the Error message, and the remaining lines will be used as the error-stack.)

That is... odd. Does ...str.split("\n") to spread each line into a different argument to fail work? the type definition claims it's a spread function.

@ghost

Deleted user (ghost) commented May 4, 2018 •

Copy link
Copy Markdown
Author

Wesley Wigham (@weswigham) Testing more, If I write fail("abc\ndef"); it will fail with the message def and everything before is missing. If I write fail("abc", "def") it will fail with the message abc and everything after is missing. As far as I can tell, only fail(new Error("abc\ndef")) prints every line in the error message.

@ghost
ghost merged commit 835e325 into master May 4, 2018
@ghost
ghost deleted the jake_fails branch May 4, 2018 15:23
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jul 31, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant