Ask Your Question
1

Error importing function definitions in Bash

asked 2016-05-15 03:33:08 -0500

updated 2016-05-15 03:34:15 -0500

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-17 13:04:00 -0500

mclmmc gravatar image

Look here.

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

edit flag offensive delete link more

Comments

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

Brenton Horne gravatar imageBrenton Horne ( 2016-05-18 04:46:57 -0500 )edit

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

Brenton Horne gravatar imageBrenton Horne ( 2016-05-18 06:44:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-15 03:33:08 -0500

Seen: 193 times

Last updated: May 17 '16