# Error importing function definitions in Bash

I have written a shell script installer for Visual Studio Code (VSCode) that is designed to work on Fedora, amongst other distributions and while on its other supported distributions it is running fine, whenever I run it on a 64-bit Fedora 23 VirtualBox machine (VBM) I get the error:

/bin/bash: error importing function definition for BASH_FUNC_src-method'
/bin/bash: error importing function definition for BASH_FUNC_vscode-build'
/bin/bash: error importing function definition for BASH_FUNC_vscode-install'
/bin/bash: error importing function definition for BASH_FUNC_fedora-build'
/bin/bash: error importing function definition for BASH_FUNC_src-build'


these errors do not occur on CentOS, Debian, Linux Mint, Mageia, Sabayon Linux and Ubuntu VBMs. As this error is only affecting Fedora I am guessing there's either a bug in Bash or I am missing some important packages that give Bash a better ability to define and remember functions. The exact command that gives this error is:

/bin/bash -c "$(curl -sL https://git.io/vrLNn)"  the $(curl ...) component of this command downloads the quick-install.sh script of my VScode-installer repository. I am mentioning this in case you want to see exactly what this script does, in order to understand exactly what commands are returning these errors. I know this isn't an error in my scripts as these BASH_FUNC errors do not occur on the other supported distributions of the installer.

In order to check if this error was due to something I had done on the VBM I created a new (i.e., installed from scratch using the KDE CD ISO image for 64-bit F23) Fedora 23 VBM and ran:

/bin/bash -c "\$(curl -sL https://git.io/vrLNn)"
`

which returned the same error message as on my older Fedora 23 VBM.

edit retag close merge delete

Sort by » oldest newest most voted

Look here.

if it is correct, the problem is the hyphen in name.

more

Any characters I can use in the hyphen's place? Like will an underscore be acceptable?

( 2016-05-18 04:46:57 -0500 )edit

Just gave it a try and evidently the answer is yes.

( 2016-05-18 06:44:50 -0500 )edit