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

Issue with set_output? #31

Closed
ericphanson opened this issue Jul 6, 2023 · 1 comment · Fixed by #32
Closed

Issue with set_output? #31

ericphanson opened this issue Jul 6, 2023 · 1 comment · Fixed by #32

Comments

@ericphanson
Copy link
Member

I think maybe it needs an EOF for multiline outputs, according to this post: https://medium.com/@ibraheemabukaff/github-actions-exporting-multi-line-one-line-value-environment-variable-5bb86d01e866. I'm seeing an issue here:

##[debug]Set output content = **New package: ConstantRNGs v0.0.1**
Error: Unable to process file command 'output' successfully.
Error: Invalid format 'ConstantRNGs: A simple deterministic RNG, for cases when you need high efficiency and don't care about randomness'
##[debug]System.Exception: Invalid format 'ConstantRNGs: A simple deterministic RNG, for cases when you need high efficiency and don't care about randomness'
##[debug]   at GitHub.Runner.Worker.EnvFileKeyValuePairs.GetEnumerator()+MoveNext()
##[debug]   at GitHub.Runner.Worker.SetOutputFileCommand.ProcessCommand(IExecutionContext context, String filePath, ContainerInfo container)
##[debug]   at GitHub.Runner.Worker.FileCommandManager.ProcessFiles(IExecutionContext context, ContainerInfo container)
##[debug]Finishing: Collect Zulip info
@SaschaMann
Copy link
Member

I wasn't aware you could even set multiline outputs 😅

Changing set_output to match set_env should do the trick. Ideally with a random EOF token as in #26 (if someone happens to know how to fix those tests) or the current version:

function set_env(k, v)
val = cmd_value(v)
ENV[k] = val
delimiter = "EOF"
while occursin(delimiter, val)
delimiter *= "EOF"
end
add_to_file("GITHUB_ENV", join(["$k<<$delimiter", val, delimiter], "\n"))
end

SaschaMann added a commit that referenced this issue Jul 13, 2023
Simply copying set_env for now.

Fixes #31
SaschaMann added a commit that referenced this issue Jul 13, 2023
Simply copying set_env for now.

Fixes #31
SaschaMann added a commit that referenced this issue Jul 13, 2023
Simply copying set_env for now.

Fixes #31
SaschaMann added a commit that referenced this issue Jul 13, 2023
Simply copying set_env for now.

Fixes #31
SaschaMann added a commit that referenced this issue Jul 13, 2023
Simply copying set_env for now.

Fixes #31
SaschaMann added a commit that referenced this issue Jul 13, 2023
Simply copying set_env for now.

Fixes #31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants