shell.echo not as documentation shows? #1

Closed
thunder- opened this Issue Aug 18, 2012 · 1 comment

Projects

None yet

2 participants

@thunder-

The following is shown in the documentation:

shell = SimpleShell.new(Dir.pwd, { 'MY_ENV' => 'my env' })
shell.echo '${MY_ENV}'
=> 'my env'

This however does not show 'my env', but the ${MY_ENV} as is.

The following does show it as the documentation shows.

shell = SimpleShell.new(Dir.pwd, { 'MY_ENV' => 'my env' })
shell.command 'echo ${MY_ENV}'
=> 'my env'

Should 'echo' be defined as a method to make the 'shell.echo' way work, or should the code need an update as it might involve more commands that do not act as they are expected to?

@coffeeaddict coffeeaddict was assigned Aug 21, 2012
@coffeeaddict

The docs are a lie!

What happens in the first case: shell.echo 'x' gets transformed into shell.do("echo", "x"). Eg: parameter escaping is enabled.

In the second case, the command is executed as is, without parameter escaping, and functions. I will adapt the docs.

@coffeeaddict coffeeaddict added a commit that closed this issue Jan 15, 2013
@coffeeaddict Updated docs & Version bump
- Provided info about stdout/err handler
- Updates README. Fixes #1
50bf47e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment