# Ini file insert a lot of spaces

**URL:** https://talk.remobjects.com/t/ini-file-insert-a-lot-of-spaces/22247
**Category:** Train
**Created:** [June 8, 2020, 2:35pm UTC](https://talk.remobjects.com/t/ini-file-insert-a-lot-of-spaces/22247 "2020-06-08T14:35:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DonaldShimoda](https://talk.remobjects.com/user_avatar/talk.remobjects.com/donaldshimoda/32/6_2.png) [@DonaldShimoda](https://talk.remobjects.com/u/DonaldShimoda)
#### Post date: [June 8, 2020, 2:35pm UTC](https://talk.remobjects.com/t/ini-file-insert-a-lot-of-spaces/22247/1 "2020-06-08T14:35:14Z")

</div>

Is only a visual detail, but maybe easy to fix.

```
rootFolderGIT = "c:/Program Files/GIT/bin/git.exe";
rootFolderGITParams = "rev-parse --verify HEAD" ;

commit_app = shell.exec(rootFolderGIT, rootFolderGITParams, {capture : "true"} );

shell.cd(path_sourcecore);
commit_core = shell.exec(rootFolderGIT, rootFolderGITParams, {capture : "true"} );

release_ini = ini.fromFile(path_basetmp + "\\" + file_release_info);
release_ini.setValue("config", "commit_core", commit_core);
release_ini.setValue("config", "commit_app", commit_app);
release_ini.toFile(path_basetmp + "\\" + file_release_info);

```

Cause that line break an lot of spaces in the ini file

```
[config]
build=1090
release=314
commit_core=d8c2ce09c431eb64c7c10382ae8579daefc3d405

commit_app=7b523ddbf714a2d6b9e615e0828ba180d047461e

version=20.6.314.1090

```

As the file is distributed with release i hope can be fixed.

Best regards.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [June 8, 2020, 3:03pm UTC](https://talk.remobjects.com/t/ini-file-insert-a-lot-of-spaces/22247/2 "2020-06-08T15:03:41Z")

</div>

Sure you doubt have line breaks in “commit\_core” and “commit\_app”?

---

<div class="post-metadata">

### Author: ![DonaldShimoda](https://talk.remobjects.com/user_avatar/talk.remobjects.com/donaldshimoda/32/6_2.png) [@DonaldShimoda](https://talk.remobjects.com/u/DonaldShimoda)
#### Post date: [June 8, 2020, 4:00pm UTC](https://talk.remobjects.com/t/ini-file-insert-a-lot-of-spaces/22247/3 "2020-06-08T16:00:00Z")

</div>

> [@mh](#):
>
> Sure you doubt have line breaks in “commit\_core” and “commit\_app”?

Right, is possible GIT returns lines break and spaces. Theres any way to remove extra chars one Train?

Best regards.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [June 8, 2020, 5:03pm UTC](https://talk.remobjects.com/t/ini-file-insert-a-lot-of-spaces/22247/4 "2020-06-08T17:03:19Z")

</div>

yeah, just call `trim()`on the string:

```auto
release_ini.setValue("config", "commit_core", commit_core.trim());
release_ini.setValue("config", "commit_app", commit_app.trim());

```
