CustomMenu.inf not reliable

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 6 years and 8 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
lazarith
Posts: 5
Last visit: Mon Dec 10, 2018 9:56 am

CustomMenu.inf not reliable

Post by lazarith »

Product, version and build: PowerShell Studio 2017 v5.4.141
32 or 64 bit version of product: 64?
Operating system: Windows 7 Enterprise
32 or 64 bit OS: 64

I have a custommenu.inf in the project. It doesn't not work all the time and I frequently have to close and reopen powershell studio to get them to work. Below is the customemenu.inf contents.

Thanks,

[Commandline]
1=GIT - Add To Staging;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" add "$file$"
2=GIT - Commit To Local Repo;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" commit $fileName$ -m "{Prompt|Enter comment|Commit from mbrown $Date$ $Time$}"
3=GIT - Commit All To Local Repo;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" commit -a -m "{Prompt|Enter comment|Commit from mbrown $Date$ $Time$}"
4=-
5=GIT - Status;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" status
6=-
7=GIT - Push Files To Remote Repo;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" push -u origin master
8=GIT - Fetch From Remote Repo;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" fetch origin master
9=GIT - Pull From Remote Repo;"C:\Users\mbrown\AppData\Local\Programs\Git\bin\git.exe" pull origin master

[Application]
1=GIT - GUI;"C:\Users\mbrown\AppData\Local\Programs\Git\cmd\git-gui.exe"
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: CustomMenu.inf not reliable

Post by davidc »

Can you elaborate on what you mean by "it doesn't work all the time"? Do you mean the menu doesn't appear or the items on the menu do not trigger?

Note: If you place the inf in a Project folder, the menu will only appear when a file within that folder is open. If you want the menu to always appear, regardless of the file, then place the inf in the following folder:

C:\ProgramData\SAPIEN\PowerShell Studio 2017
David
SAPIEN Technologies, Inc.
User avatar
lazarith
Posts: 5
Last visit: Mon Dec 10, 2018 9:56 am

Re: CustomMenu.inf not reliable

Post by lazarith »

I mean the menu dropdown doesn't always appear. Sometimes it works, sometimes it doesn't. When it stops working i must exit poweshell studio and open it up again.

I have verified that I have a file open when it is not working. I am open to a web session to demonstrate if needed.
User avatar
lazarith
Posts: 5
Last visit: Mon Dec 10, 2018 9:56 am

Re: CustomMenu.inf not reliable

Post by lazarith »

I am able to recreate the problem reliably.

I have the project in C:\Projects \vCenterDeploy. If I open that project and open a file in the root such as c:\Projects\vCenterDeploy\Main.ps1 the menu works.

If I open a file in a sub-folder such as C:\Projects\vCenterDeploy\Functions\New-TempOSSpec.ps1, the menu fails. Even if I have the main.ps1 file still open.

Once the menu fails, it will not return even on the original file it was working on until you close and reopen Powershell Studio.

You can also get it to fail by trying the menu before you open a file and then it will continue to fail for the remainder of the session.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: CustomMenu.inf not reliable

Post by davidc »

I was able to reproduce the issue. We are investigating and will get back to you.

FYI, currently the CustomMenu.inf only applies to the root folder.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: CustomMenu.inf not reliable

Post by davidc »

We found the issue and will resolve it in the next build.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: CustomMenu.inf not reliable

Post by davidc »

Please try the latest service release (v5.4.142) and let us know if the issues persists.
David
SAPIEN Technologies, Inc.
User avatar
lazarith
Posts: 5
Last visit: Mon Dec 10, 2018 9:56 am

Re: CustomMenu.inf not reliable

Post by lazarith »

Thanks David and Sapien team for fixing this so quickly. It is now reliable in that it will open if you have a file open and actively editing that is in the root folder. If you try and open it otherwise, it doesn't show anything but no longer breaks functionality.

Since I am using this custom menu for git to manage the project, it seems weird to be forced to have a file open in the main folder to manage version control. I am sure there are reasons other than the way I am using it that the behavior makes sense for custom menu.

Git is wildly used and is the company standard in many organizations. Making Git support native and moving it to the version control tab is something that I am sure a lot of users would like to see in future versions.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: CustomMenu.inf not reliable

Post by davidc »

Adding better integration for GIT and other source control providers is on our wish list. We are aware that a growing number of PowerShell users rely on Git for their source control and their community projects.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 8 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.