Skip to content

Conversation

@deiga
Copy link
Contributor

@deiga deiga commented Apr 16, 2020

Ensure POSIX compatibility

Fixes #204

Ensure POSIX compatibility
@deiga deiga mentioned this pull request Apr 16, 2020
@deiga deiga marked this pull request as ready for review April 16, 2020 13:29
# need a Unix path

if type cygpath > /dev/null 2>&1; then
if type cygpath >/dev/null 2>&1; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a cosmetic change, or actually required for POSIX compliance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cosmetic change

PROJECT_GH="databus23/$PROJECT_NAME"
GREP_COLOR="never"

: ${HELM_PLUGIN_DIR:="$(helm home --debug=false)/plugins/helm-diff"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We do use HELM_PLUGIN_DIR in installFile. Should we just revert this or just make it POSIX-compliant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mumoshu AFAIK the : denotes the line as pretty much a comment and thus would not run. As helm home is not supported in helm3

Copy link
Collaborator

Choose a reason for hiding this comment

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

@deiga Thanks. I thought so at first, but my tiny experiment revealed that this seems to have actual side-effect of assigning the value.

$ bash -c ': ${FOO:=somevalue}; echo $FOO'
somevalue

As helm home is not supported in helm3

Good catch! Then it can be said that this can safely be removed for helm 3. Not yet sure that's alright for helm 2 though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Should I add a conditional for helm2?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@deiga That would be awesome! It will allow us to move forward without deciding if it's necessary or not right now.

deiga added 2 commits June 14, 2020 14:25
@deiga
Copy link
Contributor Author

deiga commented Jun 14, 2020

@mumoshu Sorry, this took me forever to get back to. It should now work for both Helm v2 and v3

@okgolove
Copy link
Contributor

Any chances this one will be merged?

Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution!

@mumoshu mumoshu merged commit 36dc2ff into databus23:master Jul 20, 2020
@deiga deiga deleted the change-install-to-sh branch July 21, 2020 20:45
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.

can't execute 'bash'

3 participants