bashsupport-pro icon indicating copy to clipboard operation
bashsupport-pro copied to clipboard

Exported variable "could be local"

Open jakub-bochenski opened this issue 4 months ago • 1 comments

#!/bin/bash

main() {
	ROOT="$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")/.."
	export ROOT
}

while you can technically do that, I don't think it's useful to declare exported variables as local

jakub-bochenski avatar Sep 03 '25 15:09 jakub-bochenski