cucumber / cucumber/polyglot-release

Use local for local variables.

Open
#79 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### 🤔 What's the problem you've observed?

Bash support local variables, we don't use these (I think), so our state leaks.

```

#!/bin/bash

my_function () {
local func_result="some result"
echo "$func_result"
}

func_result="$(my_function)"
echo $func_result
```

From:
https://linuxize.com/post/bash-functions/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.