T
T
TempUserMain2014-06-07 11:51:52
CVS
TempUserMain, 2014-06-07 11:51:52

Incorrect argument passing in Ant?

There is code:
Ant script:

<property name="propertyName" value="<корень папки>/folderMain"/>

<target name="targetName">

       <exec dir="<путь до папки, в которой находится someFile.js>" executable="${env.NODEPATH}\node" output="<путь до txt-файла>">
           <arg line="someFile.js"/>
           <arg line="${propertyName}/ru/rootNew/folderNew"/>
       </exec>

</target>

js code (someFile.js):
var dir1 = path.resolve(process.argv[2]);
var dir2 = path.resolve(process.argv[3]);

<остальной код>

When executing the code in a txt file, the output is:
Error: ENOENT, no such file or directory '<путь до папки, в которой находится someFile.js>\null\rootNew\folderNew'

If you specify the path in target in the second argument without using properties / variables, then the code works correctly.
Please tell me what is the reason for the error?
UPD:
I don't know what exactly happened, but now everything works.
Issue resolved.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question