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

Invalid JSON in options error when omitting the options input entirely #77

Closed
SimJoSt opened this issue Jan 16, 2024 · 2 comments · May be fixed by #85 or #86
Closed

Invalid JSON in options error when omitting the options input entirely #77

SimJoSt opened this issue Jan 16, 2024 · 2 comments · May be fixed by #85 or #86

Comments

@SimJoSt
Copy link
Contributor

SimJoSt commented Jan 16, 2024

When calling the deployer GitHub action without setting any values for the options input, the following error message appears: Invalid JSON in options
It doesn't break the deployment, however an error message in a successful deployment log feels weird :) And with no actual problems occurring, I was wondering if the error detection is slightly off.
I'm not familiar with the try-catch logic yet, so I cannot provide and improvement as a PR at this time.

Relevant code snippet:

action/index.js

Lines 116 to 126 in 06aeb29

let options = []
try {
let optionsArg = core.getInput('options')
if (optionsArg !== '') {
for (let [key, value] in Object.entries(JSON.parse(optionsArg))) {
options.push('-o', `${key}=${value}`)
}
}
} catch (e) {
console.error('Invalid JSON in options')
}

Readme section:

action/README.md

Lines 26 to 29 in 06aeb29

# Config options for the Deployer. Same as the `-o` flag in the CLI.
# Optional.
options:
keep_releases: 7

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@Milkman337
Copy link

any update on this

@tobz-nz
Copy link

tobz-nz commented Jun 21, 2024

duplicate of #72

This was referenced Jun 30, 2024
@SimJoSt SimJoSt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
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.

3 participants