Skip to content

Conversation

@robinbraemer
Copy link
Contributor

No description provided.

@robinbraemer robinbraemer marked this pull request as draft March 13, 2024 11:25
Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

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

Thanks!

@robinbraemer
Copy link
Contributor Author

robinbraemer commented Mar 13, 2024

I'm not a bash pro so we will probably want to specifically want the variables to expand to args the same way as done in finalArgs.

Edit:

In my testing it works fine in any case: EXTRA_ARGS can be empty; EXTRA_ARGS can contain --universe /data/worlds; haven't tested if EXTRA_ARGS with more flags works, but I assume so

@robinbraemer
Copy link
Contributor Author

Confirming the added DEBUG_EXEC also prints as expected

[init] Using Forge supplied run.sh script...
+ exec mc-server-runner --stop-duration 60s --shell bash run.sh '--universe ./worlds/'

@robinbraemer robinbraemer marked this pull request as ready for review March 13, 2024 12:23
@itzg itzg merged commit eec264c into itzg:master Mar 13, 2024
@robinbraemer
Copy link
Contributor Author

Warning: looks like there is still an issue: I just tried deploying it in k8s.

[minecraft/Main]: Failed to start the minecraft server
joptsimple.UnrecognizedOptionException: universe /data/worlds is not a recognized option

@itzg
Copy link
Owner

itzg commented Mar 13, 2024

I'm glad to hear using multiple args seems to have worked. That would have been my only doubt also.

@robinbraemer
Copy link
Contributor Author

Trying out "${EXTRA_ARGS[@]}" would behave...

if isTrue "${DEBUG_EXEC}"; then
set -x
fi
exec mc-server-runner "${mcServerRunnerArgs[@]}" --shell bash "${SERVER}" "${EXTRA_ARGS}"
Copy link
Owner

Choose a reason for hiding this comment

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

and just saw your follow up. Removing the double quotes around the car should help it here.

Sorry if I merged your PR too soon. Will need a new one for the tweak.

@robinbraemer
Copy link
Contributor Author

robinbraemer commented Mar 13, 2024

Better reopen this PR if possible, trying to fix it here. or well i'll make a new pr

@itzg
Copy link
Owner

itzg commented Mar 13, 2024

Trying out "${EXTRA_ARGS[@]}" would behave...

I don't think adding the @ will work since it's a string variable and not an array.

@itzg
Copy link
Owner

itzg commented Mar 13, 2024

Notice it's not quoted when added here

@itzg
Copy link
Owner

itzg commented Mar 13, 2024

We'll need a new PR since merged PRs can't be re-opened.

sevenrats pushed a commit to sevenrats/docker-minecraft-server that referenced this pull request Nov 19, 2024
sevenrats pushed a commit to sevenrats/docker-minecraft-server that referenced this pull request Nov 19, 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 this pull request may close these issues.

2 participants