# Last character removed from .drone.yml build step in 1.0.0-rc.3

**URL:** <https://drone.discourse.group/t/last-character-removed-from-drone-yml-build-step-in-1-0-0-rc-3/8377>\
**Category:** Drone Support\
**Created:** [December 26, 2018, 12:25pm UTC](https://drone.discourse.group/t/last-character-removed-from-drone-yml-build-step-in-1-0-0-rc-3/8377 "2018-12-26T12:25:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![n7st](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/n7st/32/5914_2.png) [@n7st](https://drone.discourse.group/u/n7st)\
**Post date:** [December 26, 2018, 12:25pm UTC](https://drone.discourse.group/t/last-character-removed-from-drone-yml-build-step-in-1-0-0-rc-3/8377/1 "2018-12-26T12:25:29Z")

</div>

Hi,

I’m trying out 1.0.0-rc.3 with the following build YAML for a Perl project:

```
workspace:
    base: /opt
    path: Robot

pipeline:
    build:
        image: poum/distzilla
        commands:
            # Set up the default config file
            - cp data/config.yml.example data/config.yml
            # Install dependencies quickly, don't test them
            - dzil authordeps | xargs -n 5 -P 10 cpanm --verbose --notest --quiet
            - dzil listdeps --author | xargs -n 5 -P 10 cpanm --verbose --no-interactive --notest --quiet
            # Test our own module
            - dzil smoke

```

The build is failing with an error:

```
+ dzil smok
Unrecognized command: smok.

```

This looks like the last character from the last build step is being ignored. On adding an extra line to the build, which is `echo Done`, I get the following output at the very end of the build (and the `dzil smoke` command succeeds):

```
+echo Don
Don

```

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [December 26, 2018, 2:45pm UTC](https://drone.discourse.group/t/last-character-removed-from-drone-yml-build-step-in-1-0-0-rc-3/8377/2 "2018-12-26T14:45:18Z")

</div>

Drone takes your commands and converts them to a shell script. We can use the command line tools to see the script Drone is creating. Since you are using the legacy yaml format, the first step is to convert the yaml to the new format (drone does this automatically):

```auto
drone convert --save

```

Next we “compile” the yaml file the intermediate representation:

```auto
drone-yaml compile

```

This creates a json file with the shell script in base64 format. I took the base64 format and decoded, and this is what I am seeing:

```nohighlight
if [-n "$CI_NETRC_MACHINE"]; then
cat <<EOF > $HOME/.netrc
machine $CI_NETRC_MACHINE
login $CI_NETRC_USERNAME
password $CI_NETRC_PASSWORD
EOF
chmod 0600 $HOME/.netrc
fi
unset CI_NETRC_USERNAME
unset CI_NETRC_PASSWORD
unset DRONE_NETRC_USERNAME
unset DRONE_NETRC_PASSWORD
set -e

echo + "cp data/config.yml.example data/config.yml"
cp data/config.yml.example data/config.yml

echo + "dzil authordeps | xargs -n 5 -P 10 cpanm --verbose --notest --quiet"
dzil authordeps | xargs -n 5 -P 10 cpanm --verbose --notest --quiet

echo + "dzil listdeps --author | xargs -n 5 -P 10 cpanm --verbose --no-interactive --notest --quiet"
dzil listdeps --author | xargs -n 5 -P 10 cpanm --verbose --no-interactive --notest --quiet

echo + "dzil smoke"
dzil smoke

```

So unfortunately this is not something I am able to reproduce at the moment. All of the source code can be found [here](https://github.com/drone/drone-cli/tree/master/drone/exec) … can you reproduce locally when running `drone exec`? Perhaps there is something in the code you can see that I’m missing?

---

<div class="post-metadata">

**Author:** ![n7st](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/n7st/32/5914_2.png) [@n7st](https://drone.discourse.group/u/n7st)\
**Post date:** [December 26, 2018, 4:00pm UTC](https://drone.discourse.group/t/last-character-removed-from-drone-yml-build-step-in-1-0-0-rc-3/8377/3 "2018-12-26T16:00:57Z")

</div>

Hi Brad,

After converting from the legacy YAML format and properly linting the file, the build runs fine.

I think the issue is resolved.

Thanks for your help,  
Mike
