Skip to content

Commit

Permalink
bump 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Oct 15, 2023
1 parent 43c7ff9 commit b9edc0b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@ Paths are set in either `~/.bash_aliases` or `~/.bash_profile` or `~/.bashrc` fi


# Release Notes
* 2.0.2: Re-enabled broadcast changes on win32, fixing new terminal launch.
* 2.0.1: Bug fix.
* 2.0.0: Rewrite. New command line api. Extensively tested on mac/win/ubuntu X github.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ classifiers = ["Programming Language :: Python :: 3"]
dependencies = ["pywin32; sys_platform == 'win32'"]
# Change this with the version number bump.
# Also make the change in zcmds/version.py
version = "2.0.1"
version = "2.0.2"

[project.scripts]
"setenvironment_set" = "setenvironment.cli:setenv"
"setenvironment_get" = "setenvironment.cli:getenv"
"setenvironment_unset" = "setenvironment.cli:unsetenv"
"setenvironment_addpath" = "setenvironment.cli:addpath"
"setenvironment_removepath" = "setenvironment.cli:removepath"
"setenvironment" = "setenvironment.main:main"
"setenvironment" = "setenvironment.main:main"
1 change: 1 addition & 0 deletions src/setenvironment/setenv_unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def remove_from_path_group(group_name: str, path_to_remove: str) -> None:
os_env.store()
env.save()


def remove_path_group(group_name: str) -> None:
assert group_name != "PATH"
env: BashEnvironment = bash_make_environment()
Expand Down
8 changes: 6 additions & 2 deletions src/setenvironment/win/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

HERE = os.path.dirname(__file__)
WIN_BIN_DIR = os.path.join(HERE, "win")
ENABLE_BROADCAST_CHANGES = False
# ENABLE_BROADCAST_CHANGES = os.environ.get("ENABLE_BROADCAST_CHANGES", "1") == "1"
# flip the default to False
DISABLE_BROADCAST_CHANGES = (
os.environ.get("SETENVIRONMENT_DISABLE_BROADCAST_CHANGES", "0") == "1"
)

_DEFAULT_PRINT = print
_REGISTERLY_VALUE_PATTERN = re.compile(r" .+ (?P<type>.+) (?P<value>.+)*")
Expand Down Expand Up @@ -87,7 +91,7 @@ def get_env_from_shell() -> Environment:


def win32_registry_broadcast_changes() -> None:
if not ENABLE_BROADCAST_CHANGES:
if DISABLE_BROADCAST_CHANGES:
return
print("Broadcasting changes")
rtn = subprocess.call("refreshenv", cwd=WIN_BIN_DIR, shell=True)
Expand Down

0 comments on commit b9edc0b

Please sign in to comment.