Last character of script being removed when file is saved/signed

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jdainsworth
Posts: 25
Last visit: Thu Dec 14, 2023 9:10 am

Last character of script being removed when file is saved/signed

Post by jdainsworth »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Sapien PowerShell Studio 2019 (5.6.156)
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 (1803 17134.472)
32 or 64 bit OS: 64-bit

*** Please add details and screenshots as needed below. ***

I noticed a weird issue today, that I have never seen before. When signing and saving a file (.ps1), the very last character before the prior signature is being removed. I first noticed that an END block was missing it's closing }, and I had to keep re-adding it every couple of saves. I then added a comment, and I could keep clicking the save button, and each time 1 character would disappear from the comment.

I was running 5.5.155, and updated to 5.6.156 to see if it was resolved, and it was not.

What makes it even odder is, I have several other .ps1 files open, and none of them are doing it.


DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Mon Mar 18, 2024 9:24 am

Re: Last character of script being removed when file is saved/signed

Post by Olga_B »

Thanks for reporting the issue

If you can, please zip and load up the original psf file(s), so that we can attempt to recreate the issue:

https://www.sapien.com/support/upload
User avatar
jdainsworth
Posts: 25
Last visit: Thu Dec 14, 2023 9:10 am

Re: Last character of script being removed when file is saved/signed

Post by jdainsworth »

I have uploaded the requested file.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Last character of script being removed when file is saved/signed

Post by davidc »

I have been unable to reproduce the issue on my end.
I did notice that you have Unix style line endings and ASCII encoding. Have you tried changing the line endings to Windows (CRLF), to see if that makes a difference when signing?
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Last character of script being removed when file is saved/signed

Post by davidc »

Correction: I was able to reproduce it if the line endings was to Unix. If I switched it to Windows, the issue went away on my end. Since the signing process is handled externally, I'm not sure there is much we can do, but I will forward this to the dev team.
David
SAPIEN Technologies, Inc.
This topic is 5 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.