#262 sysinfo task fails if enviroment variable has "bad" name

Tasks (408)
Gert Kello

if there is a enviroment variable which name is not
valid nant property name ("set som;e=something", for
example), the task will fail.

xxx.build file:

<?xml version="1.0" ?>
<project name="Enviroment fail">
<sysinfo />

and the command script to reproduce:

set som;e=something

attached zipped example


  • Gert Driesen

    Gert Driesen - 2004-12-09

    Logged In: YES

    Gert (nice name, btw ;-)),

    Now I remember: we can't create a property for a
    environment variable if the name of that environment variable
    is not a valid property name.

    What we do is: if failonerror is "false", we just skip that
    environment variable, and continue with the next environment

    I would suggest using the environment::get-variable()
    function instead for retrieving the value of a environment

    I don't think its a good idea to just skip environment variables
    (with "bad" names) if failonerror is "true".

    What do you think ?

  • Gert Driesen

    Gert Driesen - 2004-12-11
    • status: open --> closed
  • Gert Driesen

    Gert Driesen - 2004-12-11

    Logged In: YES

    Gert, I've now documented this behaviour and added a
    pointer to the environment functions

  • Gert Driesen

    Gert Driesen - 2004-12-11
    • milestone: --> 0.85
    • assigned_to: nobody --> drieseng
    • status: closed --> closed-fixed
  • Gert Kello

    Gert Kello - 2004-12-11

    Logged In: YES

    Gert (really good name, isn't it? ;) ),

    From the help: "The intent of this task is for nightly build
    logs to have a record of system information so that the
    build was performed on." So, that was exaclty for what I did
    use the task:
    <sysinfo verbose="true" />

    I was quite surprised when the build failed on one of my
    co-worker computer... When reading the docs, I didn't think
    that the task could ever fail. Maybe You should update the
    documentation to mention the possibility of failure...


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks