Skip to content
  • Mislav Marohnić's avatar
    fdcfac8d
    rbenv install: fix substituting $HOME with "~" (#2501) · fdcfac8d
    Mislav Marohnić authored
    Depending on bash version, the expression `${var/$HOME\//~/}` will not have
    effect because the "~" character in the replacement expression is expanded.
    
    The updated approach is a bit of a mouthful, but it avoids using "~" in a
    substitution pattern, while also guarding against values of HOME that are
    blank or when HOME is literally just "/".
    fdcfac8d
    rbenv install: fix substituting $HOME with "~" (#2501)
    Mislav Marohnić authored
    Depending on bash version, the expression `${var/$HOME\//~/}` will not have
    effect because the "~" character in the replacement expression is expanded.
    
    The updated approach is a bit of a mouthful, but it avoids using "~" in a
    substitution pattern, while also guarding against values of HOME that are
    blank or when HOME is literally just "/".
Loading