repogen icon indicating copy to clipboard operation
repogen copied to clipboard

fix: change string `/` with `os.PathSeparator`

Open ahmadkarlam opened this issue 3 years ago • 2 comments

This PR will be fix error path separator on windows.

When I am using repogen, I found error unable to load env file. image

I asked a friend because I was afraid that I would make a mistake when using repogen. It turned out that my friend and I used the same command.

I did some debugging and it turned out that when repogen did strings.Split, the windows path with unix was different. 147407024-fa9ccd57-522c-4f34-a30f-a36f7a8bec4f

That's why I changed "/" to os.PathSeparator to handle multiplatform for this command.

ahmadkarlam avatar Dec 26 '21 11:12 ahmadkarlam