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

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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 1 month old and the forum Administrator has chosen for old topics to be locked when a reply is attempted. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jdainsworth
Posts: 11
Joined: Mon May 23, 2016 8:48 am

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

Post by jdainsworth » Tue Jan 15, 2019 12:03 pm

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: 79
Joined: Mon May 15, 2017 9:06 am

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

Post by Olga_B » Tue Jan 15, 2019 2:06 pm

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: 11
Joined: Mon May 23, 2016 8:48 am

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

Post by jdainsworth » Wed Jan 16, 2019 3:15 pm

I have uploaded the requested file.

User avatar
davidc
Posts: 5642
Joined: Thu Aug 18, 2011 4:56 am

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

Post by davidc » Wed Jan 16, 2019 3:35 pm

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: 5642
Joined: Thu Aug 18, 2011 4:56 am

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

Post by davidc » Wed Jan 16, 2019 3:43 pm

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.