Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

New bugs with command line args in bash script #177

Closed
drekka opened this Issue Jan 23, 2012 · 3 comments

Comments

Projects
None yet
2 participants

drekka commented Jan 23, 2012

Hi Tomaz

I pulled and built appledoc yesterday and it seems to be having some new problems with the command line args when I run from within a script. The weird thing being that if I cut and paste the assembled command and execute normally, it works just fine. Here's the relevant section of the script:

DC_APPLEDOC_CMD="appledoc --ignore .m -o \"$DC_BUILD_DIR/appledoc\" -p \"$DC_PROJECT_NAME\" -v \"$DC_CURRENT_PROJECT_VERSION\" -c \"$DC_COMPANY\" --company-id \"$DC_COMPANY_ID\" --install-docset --keep-intermediate-files --keep-undocumented-objects --keep-undocumented-members $DC_SRC"
echo Appledoc command: $DC_APPLEDOC_CMD
$DC_APPLEDOC_CMD

The first problem appears to be with the $DC_COMPANY variable. If it has a space it appears that, even with quotes, appledoc is breaking it up and getting confused, treating it's contents as new arguments.

The second problem appears to be that the $DC_SRC doesn't like quotes around it.

But as I said, if I run this it won't work, but if I cut and paste the echoed command, it works just fine.

So I'm having a few problems working this out :-)

Owner

tomaz commented Jan 25, 2012

Sorry for late reply... Don't have an answer for you I'm afraid - if it works when invoked directly, it has to do something with the variables and/or environment it's invoked in (bash etc). I don't remember changing something that would affect the command line. I'll leave this ticket open for a while in case me or someone else gets an idea...

drekka commented Jan 29, 2012

Ok, I'll let you know if I can deduce anything further.

Owner

tomaz commented Aug 25, 2012

Closing for now as it doesn't seem related to source code.

@tomaz tomaz closed this Aug 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment