Closed sormuras closed 1 year ago
Are you suggesting to modify this line with the following ?
System.out.printf("echo \"%s=%s\" >> $GITHUB_OUTPUT%n", name, value);
Or do you see other changes that are necessary ?
(I am interested in taking this issue)
Yes, as far as I can tell, it's the only line that requires a change:
Your proposed change woudn't work on Windows (cmd.exe
nor PowerShell), would it?
Perhaps using NIO's Files.write[String]()
is platform-agnostic solution. Something like:
var output = Path.of(System.env...);
Files.write(
output,
List.of(name + "=" + value),
StandardCharsets.UTF_8,
StandardOpenOption.CREATE,
StandardOpenOption.APPEND,
StandardOpenOption.WRITE);
Before you hack away and create a pull request, I first need to clarify whether and how contributions can be submitted.
Starting today runner version 2.298.2 will begin to warn you if you use the
save-state
orset-output
commands via stdout.
Warnings are now in place.
@derlin I am taking care of this issue because I want to get rid of the warnings as soon as possible. That's why I removed the good first issue label and filed:
Outputs are empty?!
https://github.com/oracle-actions/setup-java/blob/2e3562c72585cd036e42706589f272ed8d08f24d/src/Download.java#L221
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/