ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
37 stars 4 forks source link

API Endpoints using same file are not refreshed when file is changed #3179

Open realslacker opened 8 months ago

realslacker commented 8 months ago

Version

4.2.13

Severity

Low

Steps to Reproduce

When two API endpoints use the same file and one endpoint is edited the other endpoint still reflects the old code. When PSU is reloaded the code changes in the first endpoint are lost OR the second endpoint is updated.

If the code is edited using the Configuration section (directly editing the script) and the configuration is reloaded both endpoints are updated.

I believe there is some issue when two endpoints share a common script that is causing the script to not be saved/updated correctly.

Expected behavior

Edit the endpoint with shared code, save, both endpoints reflect the change.

Actual behavior

Edit the endpoint with shared code, save, edited endpoint reflects new code. Second endpoint reflects old code. After reload both endpoints reflect old code.

Additional Environment data

No response

Visuals

image

adamdriscoll commented 7 months ago

I didn't realize you could do this 😄 I though paths were unique per endpoint.

Seems like a valid use case but we will have to update the logic to support it.

realslacker commented 7 months ago

I'm just creating edge cases for you to test 😂