-
8 Mar 2012 10:13 AM #1
sencha.bat run twice
sencha.bat run twice
Hi
I had a small problem with sencha.bat from the windows sdk (c:\SenchaSDKTools-2.0.0-Beta\bin\sencha.bat). I always had to start the batch file twice. This is because of variable expansion at parse time. The variables sdkpath and dir had their values set the first time but are not expanded inside the if statement. The second time the variables are set.
Here is a description about this problem:
http://superuser.com/questions/78496/variables-in-batch-file-not-being-set-when-inside-if
Here the changed version of sencha.bat. With this changes I only have to start sencha.bat once
Code:@echo off setlocal enabledelayedexpansion IF EXIST .senchasdk ( SET /P sdkpath= < .senchasdk "!sdkpath!\command\sencha" %* ) ELSE ( set dir=%~dp0 jsdb -path "!dir!..\command" "!dir!..\command\sencha.js" %* )
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote