Skip to content

Disable update prompt with env, refresh vpn list without updating secret #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

devdinu
Copy link
Contributor

@devdinu devdinu commented Sep 12, 2018

  • Refresh VPN list alone

@arunvelsriram
Copy link
Member

@devdinu auto update check is replaced with command option -u in the master. So changes related to that is not necessary.

Refresh VPN list option -r is great. Please rebase master and push the changes for -r option alone.

@devdinu devdinu force-pushed the master branch 4 times, most recently from 1fd31ea to 848c8fc Compare September 13, 2018 16:13
@devdinu
Copy link
Contributor Author

devdinu commented Sep 13, 2018

Fixed conflicts and updated the PR.

lazy-connect.sh Outdated
@@ -60,7 +69,7 @@ function _lazy_connect() {
set vpnMenu to (menu bar item 1 of menu bar 1 where description is "VPN")
tell vpnMenu to click
try
click menu item vpnName of menu 1 of vpnMenu
click menu item ("Connect " & vpnName) of menu 1 of vpnMenu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required because the VPN names are stored with the prefix "Connect". This is required to handle extra spaces in VPN names. For example "Connect VPN name" will not work with click menu item ("Connect " & vpnName) of menu 1 of vpnMenu.

@arunvelsriram
Copy link
Member

lazy-connect -i is not working correctly. It's writing all the VPN names in on line in ~/.config/lazy-connect/vpns.

I suspect this arunvelsriram@9f93393#diff-7f006cb852c9dd49a430db80a7c9bac8R38

@devdinu devdinu force-pushed the master branch 3 times, most recently from dc41f4b to 1a1629b Compare September 19, 2018 17:50
@arunvelsriram
Copy link
Member

arunvelsriram commented Sep 19, 2018

For new users this change introduces some issues. Here is the output of lazy-connect -i in a clean environment:

$ lazy-connect -i
Secret Key: **********
refreshing vpn...
cp: /Users/arunvelsriram/.config/lazy-connect/vpns: No such file or directory
Updated VPN List:

TODO:

  • Fix cp error
  • Fix empty "Updated VPN List"

lazy-connect.sh Outdated
#! /bin/bash
#!/bin/bash

config_dir=~/.config/lazy-connect
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these variables will be exposed to the current shell that sources lazy-connect. so it's better to use either local variables or in worst case prefix it with _lazy_connect_ so that it doesn't collide with other global variables of any other script.

@arunvelsriram arunvelsriram merged commit 97edb76 into thecasualcoder:master Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants