almenscorner / IntuneCD

Tool to backup, update and document configurations in Intune
MIT License
277 stars 35 forks source link

[BUG] Script contents are overwritten with the contents of the first script in an update operation #211

Closed kdrwygvh closed 1 week ago

kdrwygvh commented 2 weeks ago

Describe the bug When performing an update, scripts are being overwritten with the contents of one of the scripts from the backup

To Reproduce Steps to reproduce the behavior:

  1. Create two scripts in Intune, "Script 1" and "Script 2." The contents of the shell script can be a simple shebang and an echo line stating that the script is "script 1" and "script 2" respectively.
  2. Perform an IntuneCD backup operation to download those scripts to disk
  3. Perform an IntuneCD update operation

Expected behavior The two scripts should still be in Intune and with the same script contents as they have on disk

Screenshots

Screenshot 2024-08-30 at 15 22 06 Screenshot 2024-08-30 at 15 22 16

Run type (please complete the following information):

Additional context Add any other context about the problem here.

almenscorner commented 2 weeks ago

Able to replicate, will look into it

almenscorner commented 2 weeks ago

Please try the latest beta and check that scripts are not being updated with incorrect content, pip3 install IntuneCD==2.3.5b1

kdrwygvh commented 1 week ago

2.3.5b1 appears to resolve.