sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

bash_hook has an unbound variable

Open dcd-arnold opened this issue 1 year ago • 0 comments

CLI Version

2.1.0

Operating System and Architecture

  • [ ] macOS (arm64)
  • [ ] macOS (x86_64)
  • [ ] Linux (i686)
  • [X] Linux (x86_64)
  • [ ] Linux (armv7)
  • [ ] Linux (aarch64)
  • [ ] Windows (i686)
  • [ ] Windows (x86_64)

Operating System Version

Ubuntu 22.04

Link to reproduction repository

No response

CLI Command

No response

Exact Reproduction Steps

Make a script with this content and run it:

#!/bin/bash
set -u

function main {
  return 1
}

# shellcheck disable=SC2312
eval "$(sentry-cli bash-hook)"
 
main

Expected Results

No error.

Actual Results

./test.sh: line 34: $1: unbound variable

Logs

No exactly possible by the use of eval.

dcd-arnold avatar May 23 '24 13:05 dcd-arnold