gogrlx / grlx

Effective Fleet Configuration Management
https://grlx.dev
BSD Zero Clause License
129 stars 7 forks source link

[BUG] `file.append` `makedirs` doesn't work. #112

Closed johnmckenna-snd closed 1 week ago

johnmckenna-snd commented 2 months ago

Please describe the issue. If try to make a file and it's directories it doesn't wok.

# doesn't work where prom-config doesn't exist
# returns error: ERROR        json: cannot unmarshal object into Go struct field StepCompletion.Error of type error        listener.go:74
steps:
  create-boilerplate-file:
    file.append:
      - name: /home/sensor/prom-config/prometheus.yml
      - makedirs: true
      - text: "boilerplate"

# this works if it only has to create the file
steps:
  create-boilerplate-file:
    file.append:
      - name: /home/sensor/prometheus.yml
      - makedirs: true
      - text: "boilerplate"

Does this bug exist on the tip of master? [x] Yes [ ] No

Please note that bugfixes will only be ported to previous major versions at the request of a Sponsor, and only when applicable and possible. It is recommended all grlx users run the lastest stable release to take advantage of the newest features and bug fixes.

Configuration

Please upload the configuration files used if applicable.

taigrr commented 2 months ago

if you're willing to test drive #d32e19b it should address this issue (tip of dev branch)

johnmckenna-snd commented 2 months ago

i can do that! probably in the next week or so.

taigrr commented 2 months ago

Cool. I am unable to publish a new version of grlx just yet, I've made a few API breaking changes to exported functions so the next release will be a v2 / major release. I'm trying to figure out all of my API breaking changes at once so I'm not at version 300 by the end of the year a la Kubernetes :laughing:

johnmckenna-snd commented 2 months ago

Ok sounds good! I am looking forward to it.

johnmckenna-snd commented 1 month ago

I just wanted to follow up here. I have not had the time to check this out, but I should soon!

taigrr commented 1 week ago

This was addressed in the most recent release.

johnmckenna-snd commented 1 week ago

Awesome thank you! I am sorry I wasn't able to get around to testing this pre-release. I have a new batch of products I'm building soon, so I will test then.