I'm getting the error "Unknown error while running file". The command I'm using to build is:

>builder-cli.exe build "C:\MyCodeBase\try-buy-installer\installer\config\MyInstaller 1.0.xml" windows --verbose --setvars builddir="C:\InstallerArtifacts" --debugtrace debug.txt

The output is:

[ 0%] Executing pre build actions [ 0%] Checking output directory

Error: Unknown error while running file C:InstallerArtifacts/apache-tomcat-7.0.41.zip Error building project Debug file written.

The XML snippet it is failing on is:

<runProgram>
        <program>file</program>
        <programArguments>${artifactsLocation}/apache-tomcat-7.0.41.zip</programArguments>
    </runProgram>

This runs on OSX, but not on Windows. Also the debug file does not get written, as I was hoping that may have a clue as to what is wrong.

asked 04 Sep '13, 11:01

Chris%20N's gravatar image

Chris N
21224
accept rate: 0%

edited 04 Sep '13, 11:02


The "file" command is not available on Windows. If you are ok with skipping that there, you could attach a rule:

<runProgram>
    <program>file</program>
    <programArguments>${artifactsLocation}/apache-tomcat-7.0.41.zip</programArguments>
    <ruleList>
         <platformTest type="unix"/>
    </ruleList>
</runProgram>

Could you provide us with more details about what you are doing with the result of 'file'?

link

answered 04 Sep '13, 11:14

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

We are trying to confirm that the file "apache-tomcat" was downloaded successfully and if not we throw an error.

For the time being I can use the skip rule. Is there a better, cross platform, way to check if a file has been downloaded successfully?

(04 Sep '13, 11:22) Chris N

What other steps were you performing to check the integrity? Do you have any data to compare the results to decide if the file is ok (md5, size...)? InstallBuilder has some actions to check files. You could for example use the <getDiskUsage> action to get the size of the <md5> action to check the md5.

(04 Sep '13, 11:27) juanjo ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×27

Asked: 04 Sep '13, 11:01

Seen: 1,337 times

Last updated: 04 Sep '13, 11:27