[Rake-devel] the origin of the strange bug on win2k

Lionel Thiry lthiry at skynet.be
Thu May 5 17:49:21 EDT 2005

Jim Weirich a écrit :
> On Wednesday 04 May 2005 10:14 pm, Lionel Thiry wrote:
>>I think it is because comspec (the win2k shell) doesn't substitute
>>variables the same way as unix shell does.
> Thanks for tracking this down.  I'm not sure yet what to do.  I could disable 
> the test on windows, but then it fails to test the feature it is designed to 
> test.

Well, I won't tell you what to do, but I can tell you how scons gets its job 
done (if i hasn't changed too much since last time I looked at its code).

It never counts on the default shell to do the variable substitutions
  a) it does variable substitution in command string itself
  b) it explicitly uses the shell to launch commands (I'm not sure why)
  c) it escapes the command string depending on the shell used
  d) it then run the command

I know well those mecanisms as I tried to use scons on my older win98 platform 
and had a bug that I tracked myself. If I correctly remember how it works, on 
win2k, the command string could look like this in ruby:
  "cmd #{cmd_escape("command string")}"

It didn't work on win98 because escaping rules were different. And my bug report 
  never been taken into account as win98 was not a supported platform.

Lionel Thiry

Personal website: http://users.skynet.be/lthiry/

More information about the Rake-devel mailing list