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

fix(install): check if gslt token empty instead of existing #2408

Merged
merged 1 commit into from Jun 22, 2019

Conversation

Projects
None yet
3 participants
@h3o66
Copy link
Contributor

commented Jun 22, 2019

Description

Fix that the empty variable of the gslt is checked instead checking that it is existing

Fixes #2364

Type of change

  • Bug fix (change which fixes an issue).
  • New feature (change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This code follows the style guidelines of this project.
  • I have provided Co-author details below.
  • I have performed a self-review of my own code.
  • I have checked that this code is commented where required.
  • I have provided a detailed enough description of this PR.
  • I have checked If documentation needs updating.

Provide Github Email

Fill out below info or tick box below:

Co-authored-by: Christian Birk <chris.h3o66@gmail.com>
@h3o66

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2019

Info taken from here:
https://stackoverflow.com/a/17538964

Stack Overflow
How do I know if a variable is set in Bash?

For example, how do I check if the user gave the first parameter to a function?

function a {
# if $1 is set ?
}

@dgibbs64 dgibbs64 changed the base branch from develop to hotfix/v19.8.1 Jun 22, 2019

@dgibbs64 dgibbs64 changed the base branch from hotfix/v19.8.1 to develop Jun 22, 2019

@dgibbs64 dgibbs64 merged commit b90623f into GameServerManagers:develop Jun 22, 2019

3 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details

@h3o66 h3o66 deleted the h3o66:fix/gslt-token branch Jun 22, 2019

@dgibbs64

This comment has been minimized.

Copy link
Member

commented Jun 23, 2019

Im getting some odd results with this change. Games that dont have gslt are also showing up.

@Frisasky

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2019

cant we just revert back to old school hard coded way to deal with gslt?
b6e3b1b

@dgibbs64

This comment has been minimized.

Copy link
Member

commented Jun 23, 2019

Found the solution

if [ -v gslt ]; then

Note its not ${gslt}

https://stackoverflow.com/a/17538964/1794210

@dgibbs64 dgibbs64 changed the title fix(install): check if gslt token empty istead of existing fix(install): check if gslt token empty instead of existing Jun 30, 2019

@dgibbs64 dgibbs64 added this to the v19.9.0 milestone Jul 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.