[Gambas-user] Problem with Shell Gambas 3.10.0

ML d4t4full at gmail.com
Thu Apr 19 19:31:19 CEST 2018


On 19/04/18 14:12, Shannon Kuchler wrote:
> Problem with Shell Gambas 3.10.0
>
> This is the Shell command I'm trying to run
>
> p1 = Shell "steamcmd +login" & " " & UserName & " " & PassWD & " " &
> "+force_install_dir" & " " & CacheSaveLocation & "/" & dlDat[1] & " "
> & "+app_update 251570 -beta" & " " & dlDat[1] & " " & "+quit" Wait For
> Input As "Process"
>
> in console it should look like this 
>
> steamcmd +login username password +force_install_dir dirname/dirname
> +app_update 251570 -beta dirname  +quit
>
> The problem is on most systems the shell command works just fine but
> on one system with a fresh install of  arch linux i get this error
>
> /bin/sh: +force_install_dir: command not found
> it like it's skipping everything up to +force_install_dir in the
> command does anyone know why?
>
> I can get it to work like this but  CacheDir is a directory with
> spaces same thing for dlDat1 it has spaces as well so that's not
> working either
>
> p1 = Exec ["steamcmd", "+login", UserName, PassWD,
> "+force_install_dir", CacheDir, "+app_update", "251570", "-beta",
> dlDat1, "+quit"] For Input As "Process"
>
>
Shannon,

Try enclosing the paths in double-quotes. For example, instead of

  "+force_install_dir" & " " & CacheSaveLocation & "/" & dlDat[1] &

Try with

  [...] & "+force_install_dir" & " """ & CacheSaveLocation & "/" &
dlDat[1] & """ " & [...]

The twin double-quotes are there to be substituted by Gambas by a single
double-quote when passed to the shell.

Likewise with the string array, instead of

  "+force_install_dir", CacheDir

Try with

  "+force_install_dir", """" & CacheDir & """"

Again, the shell sees a double-quote, then the contents of CacheDir,
then another double-quote.

Hope it helps,
zxMarce.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180419/13f995a5/attachment.html>


More information about the User mailing list