Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package direnv for openSUSE:Factory checked in at 2023-07-03 17:43:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/direnv (Old) and /work/SRC/openSUSE:Factory/.direnv.new.13546 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "direnv" Mon Jul 3 17:43:57 2023 rev:15 rq:1096479 version:2.32.3 Changes: -------- --- /work/SRC/openSUSE:Factory/direnv/direnv.changes 2022-12-13 18:57:43.835927998 +0100 +++ /work/SRC/openSUSE:Factory/.direnv.new.13546/direnv.changes 2023-07-03 17:44:09.093201158 +0200 @@ -1,0 +2,17 @@ +Mon Jun 26 20:24:54 UTC 2023 - Avindra Goolcharan <avin...@opensuse.org> + +- update to 2.32.3: + * fix: stat the already open rc file rather than another path based one on it (#1044) + * fix: remove deprecated io/ioutil uses (#1042) + * fix: spelling fixes (#1041) + * fix: appease Go 1.19 gofmt (#1040) + * fix: stdlib: use_guix: Switch to guix shell. (#1045) + * fix: pass BASH_PATH to make, matches the nixpkgs derivation (#1006) + * fix: stdlib/layout_python: exclude patchlevel from $python_version (#1033) + * fix: incorrect escape sequences during Loads under git-bash (Windows) (#1085) + * fix: skip some tests for IBM Z mainframe's z/OS operating system (#1094) + * doc: add Windows installation with winget (#1096) + * doc: link 12factor webpage for more clarity (#1095) + * website: add Plausible analytics + +------------------------------------------------------------------- Old: ---- direnv-2.32.2.tar.gz New: ---- direnv-2.32.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ direnv.spec ++++++ --- /var/tmp/diff_new_pack.CF9JsO/_old 2023-07-03 17:44:10.697210601 +0200 +++ /var/tmp/diff_new_pack.CF9JsO/_new 2023-07-03 17:44:10.745210884 +0200 @@ -1,7 +1,7 @@ # # spec file for package direnv # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define gopackagepath github.com/direnv/direnv Name: direnv -Version: 2.32.2 +Version: 2.32.3 Release: 0 Summary: Environment switcher for shells License: MIT ++++++ direnv-2.32.2.tar.gz -> direnv-2.32.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/.github/workflows/codeql.yml new/direnv-2.32.3/.github/workflows/codeql.yml --- old/direnv-2.32.2/.github/workflows/codeql.yml 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/.github/workflows/codeql.yml 2023-05-20 11:32:49.000000000 +0200 @@ -36,7 +36,7 @@ steps: - name: Checkout repository - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v3.5.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/.github/workflows/go.yml new/direnv-2.32.3/.github/workflows/go.yml --- old/direnv-2.32.2/.github/workflows/go.yml 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/.github/workflows/go.yml 2023-05-20 11:32:49.000000000 +0200 @@ -20,7 +20,7 @@ steps: - name: Set up Go - uses: actions/setup-go@v3.3.1 + uses: actions/setup-go@v3.4.0 with: go-version: 1.16 id: go @@ -33,7 +33,7 @@ id: python - name: Check out code into the Go module directory - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v3.5.2 - name: Build env: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/.github/workflows/nix.yml new/direnv-2.32.3/.github/workflows/nix.yml --- old/direnv-2.32.2/.github/workflows/nix.yml 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/.github/workflows/nix.yml 2023-05-20 11:32:49.000000000 +0200 @@ -11,10 +11,10 @@ name: Build runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@v3.5.2 with: fetch-depth: 0 - - uses: cachix/install-nix-action@v18 + - uses: cachix/install-nix-action@v20 - name: Build run: nix-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/.github/workflows/release.yml new/direnv-2.32.3/.github/workflows/release.yml --- old/direnv-2.32.2/.github/workflows/release.yml 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/.github/workflows/release.yml 2023-05-20 11:32:49.000000000 +0200 @@ -18,11 +18,11 @@ runs-on: ubuntu-latest steps: - name: Set up Go 1.16 - uses: actions/setup-go@v3.3.1 + uses: actions/setup-go@v3.4.0 with: go-version: 1.16 - name: Checkout code - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v3.5.2 - name: Get release notes id: release-notes run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/CHANGELOG.md new/direnv-2.32.3/CHANGELOG.md --- old/direnv-2.32.2/CHANGELOG.md 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/CHANGELOG.md 2023-05-20 11:32:49.000000000 +0200 @@ -1,4 +1,20 @@ +2.32.3 / 2023-05-20 +================== + + * fix: incorrect escape sequences during Loads under git-bash (Windows) (#1085) + * fix: skip some tests for IBM Z mainframe's z/OS operating system (#1094) + * fix: stdlib: use_guix: Switch to guix shell. (#1045) + * fix: stat the already open rc file rather than another path based one on it (#1044) + * fix: remove deprecated io/ioutil uses (#1042) + * fix: spelling fixes (#1041) + * fix: appease Go 1.19 gofmt (#1040) + * fix: pass BASH_PATH to make, matches the nixpkgs derivation (#1006) + * fix: stdlib/layout_python: exclude patchlevel from $python_version (#1033) + * doc: add Windows installation with winget (#1096) + * doc: link 12factor webpage for more clarity (#1095) + * website: add Plausible analytics + 2.32.2 / 2022-11-24 ================== @@ -349,7 +365,7 @@ * Handle failing pipenv on empty file and avoid an extra pipenv execution (#510) * fix `source_env` behaviour when the file doesn't exists (#487) * `watch_file` can now watch multiple files in a single invocation (#524) - * `layout_python`: prefer venv over virtualenv. Do not export VIRUAL_ENV if $python_version is unavailable or a virtual environment does not exist/can't be created + * `layout_python`: prefer venv over virtualenv. Do not export VIRTUAL_ENV if $python_version is unavailable or a virtual environment does not exist/can't be created * Adds layout_pyenv (#505) * Fix `source_up` docs to explain that search starts in parent directory (#518) * fix `path_add` to not leak local variables @@ -646,7 +662,7 @@ * CHANGE: Allow arbitrary number of args in `log_status` * CHANGE: Bump command timeout to 5 seconds * FIX: Adds selected bash executable in `direnv status` - * FIX: man changes, replaced abandonned ronn by md2man + * FIX: man changes, replaced abandoned ronn by md2man * FIX: `make install` was creating a ./bin directory * FIX: issue #114 - work for blank envs. Thanks @pwaller ! * FIX: man pages warning. Thanks @punitagrawal ! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/GNUmakefile new/direnv-2.32.3/GNUmakefile --- old/direnv-2.32.2/GNUmakefile 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/GNUmakefile 2023-05-20 11:32:49.000000000 +0200 @@ -103,6 +103,15 @@ test-tcsh \ test-zsh +# Skip few checks for IBM Z mainframe's z/OS aka OS/390 +ifeq ($(shell uname), OS/390) + tests = \ + test-stdlib \ + test-go \ + test-go-fmt \ + test-bash +endif + .PHONY: $(tests) test: build $(tests) @echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/README.md new/direnv-2.32.3/README.md --- old/direnv-2.32.2/README.md 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/README.md 2023-05-20 11:32:49.000000000 +0200 @@ -12,7 +12,7 @@ ## Use cases -* Load 12factor apps environment variables +* Load [12factor apps](https://12factor.net/) environment variables * Create per-project isolated development environments * Load secrets for deployment diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/_includes/head-custom.html new/direnv-2.32.3/_includes/head-custom.html --- old/direnv-2.32.2/_includes/head-custom.html 1970-01-01 01:00:00.000000000 +0100 +++ new/direnv-2.32.3/_includes/head-custom.html 2023-05-20 11:32:49.000000000 +0200 @@ -0,0 +1,2 @@ +<!-- Privacy Preserving Analytics --> +<script defer data-domain="direnv.net" src="https://plausible.io/js/script.js"></script> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/default.nix new/direnv-2.32.3/default.nix --- old/direnv-2.32.2/default.nix 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/default.nix 2023-05-20 11:32:49.000000000 +0200 @@ -16,13 +16,15 @@ src = builtins.fetchGit ./.; - # FIXME: find out why there is a Go reference lingering - allowGoReference = true; - # we have no bash at the moment for windows - makeFlags = lib.optional (!stdenv.hostPlatform.isWindows) [ - "BASH_PATH=${bash}/bin/bash" - ]; + BASH_PATH = + lib.optionalString (!stdenv.hostPlatform.isWindows) + "${bash}/bin/bash"; + + # replace the build phase to use the GNUMakefile instead + buildPhase = '' + make BASH_PATH=$BASH_PATH + ''; installPhase = '' make install PREFIX=$out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/docs/installation.md new/direnv-2.32.3/docs/installation.md --- old/direnv-2.32.2/docs/installation.md 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/docs/installation.md 2023-05-20 11:32:49.000000000 +0200 @@ -20,6 +20,7 @@ * [MacPorts](https://ports.macports.org/port/direnv/) * [Ubuntu](https://packages.ubuntu.com/search?keywords=direnv&searchon=names&suite=all§ion=all) * [GNU Guix](https://www.gnu.org/software/guix/) +* [Windows](https://learn.microsoft.com/en-us/windows/package-manager/winget/) See also: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/docs/ruby.md new/direnv-2.32.3/docs/ruby.md --- old/direnv-2.32.2/docs/ruby.md 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/docs/ruby.md 2023-05-20 11:32:49.000000000 +0200 @@ -44,7 +44,7 @@ ```bash # Usage: use ruby <version> # -# Loads the specified ruby version into the environent +# Loads the specified ruby version into the environment # use_ruby() { local ruby_dir=$HOME/.rubies/$1 @@ -60,7 +60,7 @@ ## A bit of explanation The last part probably needs a bit more explanation. We make use of a couple -of commands that are part of the [stdlib](/man/direnv-stdlib.1.md) which is availabe in +of commands that are part of the [stdlib](/man/direnv-stdlib.1.md) which is available in the execution context of an envrc. `use` is a command dispatch that's just there to build the @@ -71,7 +71,7 @@ `<prefix>/bin` into the PATH. This is what makes the specified ruby available. And finally `layout ruby` who like `use` translates into the `layout_ruby` -function call. It's used to decribe common project layouts. In the stdlib, the +function call. It's used to describe common project layouts. In the stdlib, the ruby layout will configure rubygems (with the `GEM_HOME` environment variable) to install all the gems into the .direnv/ruby/RUBY_VERSION folder under the project root. This is a bit similar to rvm's gemsets except that they live diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_allow.go new/direnv-2.32.3/internal/cmd/cmd_allow.go --- old/direnv-2.32.2/internal/cmd/cmd_allow.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_allow.go 2023-05-20 11:32:49.000000000 +0200 @@ -23,7 +23,7 @@ being moved to XDG_DATA_HOME. ` -func cmdAllowAction(env Env, args []string, config *Config) (err error) { +func cmdAllowAction(_ Env, args []string, config *Config) (err error) { var rcPath string if len(args) > 1 { if rcPath, err = filepath.Abs(args[1]); err != nil { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_apply_dump.go new/direnv-2.32.3/internal/cmd/cmd_apply_dump.go --- old/direnv-2.32.2/internal/cmd/cmd_apply_dump.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_apply_dump.go 2023-05-20 11:32:49.000000000 +0200 @@ -2,7 +2,7 @@ import ( "fmt" - "io/ioutil" + "os" ) // CmdApplyDump is `direnv apply_dump FILE` @@ -24,7 +24,7 @@ } filename := args[1] - dumped, err := ioutil.ReadFile(filename) + dumped, err := os.ReadFile(filename) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_deny.go new/direnv-2.32.3/internal/cmd/cmd_deny.go --- old/direnv-2.32.2/internal/cmd/cmd_deny.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_deny.go 2023-05-20 11:32:49.000000000 +0200 @@ -15,7 +15,7 @@ Action: actionWithConfig(cmdDenyAction), } -func cmdDenyAction(env Env, args []string, config *Config) (err error) { +func cmdDenyAction(_ Env, args []string, config *Config) (err error) { var rcPath string if len(args) > 1 { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_dotenv.go new/direnv-2.32.3/internal/cmd/cmd_dotenv.go --- old/direnv-2.32.2/internal/cmd/cmd_dotenv.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_dotenv.go 2023-05-20 11:32:49.000000000 +0200 @@ -2,7 +2,7 @@ import ( "fmt" - "io/ioutil" + "os" "github.com/direnv/direnv/v2/pkg/dotenv" ) @@ -10,8 +10,7 @@ // CmdDotEnv is `direnv dotenv [SHELL [PATH_TO_DOTENV]]` // Transforms a .env file to evaluatable `export KEY=PAIR` statements. // -// See: https://github.com/bkeepers/dotenv and -// https://github.com/ddollar/foreman +// See: https://github.com/bkeepers/dotenv and https://github.com/ddollar/foreman var CmdDotEnv = &Cmd{ Name: "dotenv", Desc: "Transforms a .env file to evaluatable `export KEY=PAIR` statements", @@ -20,7 +19,7 @@ Action: actionSimple(cmdDotEnvAction), } -func cmdDotEnvAction(env Env, args []string) (err error) { +func cmdDotEnvAction(_ Env, args []string) (err error) { var shell Shell var newenv Env var target string @@ -40,7 +39,7 @@ } var data []byte - if data, err = ioutil.ReadFile(target); err != nil { + if data, err = os.ReadFile(target); err != nil { return } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_fetchurl.go new/direnv-2.32.3/internal/cmd/cmd_fetchurl.go --- old/direnv-2.32.2/internal/cmd/cmd_fetchurl.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_fetchurl.go 2023-05-20 11:32:49.000000000 +0200 @@ -3,7 +3,6 @@ import ( "fmt" "io" - "io/ioutil" "net/http" "os" "path/filepath" @@ -21,7 +20,7 @@ Action: actionWithConfig(cmdFetchURL), } -func cmdFetchURL(env Env, args []string, config *Config) (err error) { +func cmdFetchURL(_ Env, args []string, config *Config) (err error) { if len(args) < 2 { return fmt.Errorf("missing URL argument") } @@ -60,7 +59,7 @@ // Create a temporary file to copy the content into, before the CAS file // location can be calculated. - tmpfile, err := ioutil.TempFile(casDir, "tmp") + tmpfile, err := os.CreateTemp(casDir, "tmp") if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_hook.go new/direnv-2.32.3/internal/cmd/cmd_hook.go --- old/direnv-2.32.2/internal/cmd/cmd_hook.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_hook.go 2023-05-20 11:32:49.000000000 +0200 @@ -21,7 +21,7 @@ Action: actionSimple(cmdHookAction), } -func cmdHookAction(env Env, args []string) (err error) { +func cmdHookAction(_ Env, args []string) (err error) { var target string if len(args) > 1 { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_prune.go new/direnv-2.32.3/internal/cmd/cmd_prune.go --- old/direnv-2.32.2/internal/cmd/cmd_prune.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_prune.go 2023-05-20 11:32:49.000000000 +0200 @@ -1,7 +1,6 @@ package cmd import ( - "io/ioutil" "os" "path" "strings" @@ -14,7 +13,7 @@ Action: actionWithConfig(cmdPruneAction), } -func cmdPruneAction(env Env, args []string, config *Config) (err error) { +func cmdPruneAction(_ Env, _ []string, config *Config) (err error) { var dir *os.File var fi os.FileInfo var dirList []string @@ -37,7 +36,7 @@ } if !fi.IsDir() { - if envrc, err = ioutil.ReadFile(filename); err != nil { + if envrc, err = os.ReadFile(filename); err != nil { return err } envrcStr := strings.TrimSpace(string(envrc)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_show_dump.go new/direnv-2.32.3/internal/cmd/cmd_show_dump.go --- old/direnv-2.32.2/internal/cmd/cmd_show_dump.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_show_dump.go 2023-05-20 11:32:49.000000000 +0200 @@ -17,7 +17,7 @@ Action: actionSimple(cmdShowDumpAction), } -func cmdShowDumpAction(env Env, args []string) (err error) { +func cmdShowDumpAction(_ Env, args []string) (err error) { if len(args) < 2 { return fmt.Errorf("missing DUMP argument") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/cmd_version_test.go new/direnv-2.32.3/internal/cmd/cmd_version_test.go --- old/direnv-2.32.2/internal/cmd/cmd_version_test.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/cmd_version_test.go 2023-05-20 11:32:49.000000000 +0200 @@ -2,13 +2,13 @@ import ( "golang.org/x/mod/semver" - "io/ioutil" + "os" "strings" "testing" ) func TestVersionDotTxt(t *testing.T) { - bs, err := ioutil.ReadFile("../../version.txt") + bs, err := os.ReadFile("../../version.txt") if err != nil { t.Fatalf("failed to read ../../version.txt: %v", err) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/commands.go new/direnv-2.32.3/internal/cmd/commands.go --- old/direnv-2.32.2/internal/cmd/commands.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/commands.go 2023-05-20 11:32:49.000000000 +0200 @@ -8,7 +8,7 @@ type actionSimple func(env Env, args []string) error -func (fn actionSimple) Call(env Env, args []string, config *Config) error { +func (fn actionSimple) Call(env Env, args []string, _ *Config) error { return fn(env, args) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/config.go new/direnv-2.32.3/internal/cmd/config.go --- old/direnv-2.32.2/internal/cmd/config.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/config.go 2023-05-20 11:32:49.000000000 +0200 @@ -57,8 +57,8 @@ } type tomlWhitelist struct { - Prefix []string - Exact []string + Prefix []string `toml:"prefix"` + Exact []string `toml:"exact"` } // Expand a path string prefixed with ~/ to the current user's home directory. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/env.go new/direnv-2.32.3/internal/cmd/env.go --- old/direnv-2.32.2/internal/cmd/env.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/env.go 2023-05-20 11:32:49.000000000 +0200 @@ -15,8 +15,7 @@ // key->values which is more handy to work with. // // NOTE: We don't support having two variables with the same name. -// I've never seen it used in the wild but accoding to POSIX -// it's allowed. +// I've never seen it used in the wild but according to POSIX it's allowed. func GetEnv() Env { env := make(Env) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/file_times.go new/direnv-2.32.3/internal/cmd/file_times.go --- old/direnv-2.32.2/internal/cmd/file_times.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/file_times.go 2023-05-20 11:32:49.000000000 +0200 @@ -11,9 +11,9 @@ // FileTime represents a single recorded file status type FileTime struct { - Path string - Modtime int64 - Exists bool + Path string `json:"path"` + Modtime int64 `json:"modtime"` + Exists bool `json:"exists"` } // FileTimes represent a record of all the known files and times diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/rc.go new/direnv-2.32.3/internal/cmd/rc.go --- old/direnv-2.32.2/internal/cmd/rc.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/rc.go 2023-05-20 11:32:49.000000000 +0200 @@ -5,7 +5,6 @@ "crypto/sha256" "fmt" "io" - "io/ioutil" "os" "os/exec" "os/signal" @@ -184,12 +183,16 @@ prelude = "set -euo pipefail && " } + // Non-Windows platforms will already use slashes. However, on Windows + // backslashes are used by default which can result in unexpected escapes + // like \b or \r in paths. Force slash usage to avoid issues on Windows. + slashSeparatedPath := filepath.ToSlash(rc.Path()) arg := fmt.Sprintf( `%seval "$("%s" stdlib)" && __main__ %s %s`, prelude, direnv, fn, - BashEscape(rc.Path()), + BashEscape(slashSeparatedPath), ) // G204: Subprocess launched with function call as argument or cmd arguments @@ -246,10 +249,10 @@ if err != nil { return false } - f.Close() + defer f.Close() // Next, check that the file is a regular file. - fi, err := os.Stat(path) + fi, err := f.Stat() if err != nil { return false } @@ -289,7 +292,7 @@ func allow(path string, allowPath string) (err error) { // G306: Expect WriteFile permissions to be 0600 or less // #nosec - return ioutil.WriteFile(allowPath, []byte(path+"\n"), 0644) + return os.WriteFile(allowPath, []byte(path+"\n"), 0644) } func findEnvUp(searchDir string, loadDotenv bool) (path string) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/internal/cmd/shell.go new/direnv-2.32.3/internal/cmd/shell.go --- old/direnv-2.32.2/internal/cmd/shell.go 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/internal/cmd/shell.go 2023-05-20 11:32:49.000000000 +0200 @@ -21,7 +21,7 @@ // shell. type ShellExport map[string]*string -// Add represents the additon of a new environment variable +// Add represents the addition of a new environment variable func (e ShellExport) Add(key, value string) { e[key] = &value } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/man/direnv-fetchurl.1 new/direnv-2.32.3/man/direnv-fetchurl.1 --- old/direnv-2.32.2/man/direnv-fetchurl.1 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/man/direnv-fetchurl.1 2023-05-20 11:32:49.000000000 +0200 @@ -48,7 +48,7 @@ When passed, the integrity of the retrieved content will be validated against the given hash. The hash encoding is based on the SRI W3C - specificiation (see https://www.w3.org/TR/SRI/ ). + specification (see https://www.w3.org/TR/SRI/ ). .SH OUTPUT .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/man/direnv-fetchurl.1.md new/direnv-2.32.3/man/direnv-fetchurl.1.md --- old/direnv-2.32.2/man/direnv-fetchurl.1.md 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/man/direnv-fetchurl.1.md 2023-05-20 11:32:49.000000000 +0200 @@ -43,7 +43,7 @@ <integrity-hash> When passed, the integrity of the retrieved content will be validated against the given hash. The hash encoding is based on the SRI W3C - specificiation (see https://www.w3.org/TR/SRI/ ). + specification (see https://www.w3.org/TR/SRI/ ). OUTPUT ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/man/direnv-stdlib.1 new/direnv-2.32.3/man/direnv-stdlib.1 --- old/direnv-2.32.2/man/direnv-stdlib.1 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/man/direnv-stdlib.1 2023-05-20 11:32:49.000000000 +0200 @@ -449,13 +449,13 @@ .SS \fB\fCuse guix [...]\fR .PP -Load environment variables from \fB\fCguix environment\fR\&. +Load environment variables from \fB\fCguix shell\fR\&. .PP -Any arguments given will be passed to guix environment. For example, \fB\fCuse guix hello\fR would setup an environment with the dependencies of the hello package. To create an environment including hello, the \fB\fC--ad-hoc\fR flag is used \fB\fCuse guix --ad-hoc hello\fR\&. Other options include \fB\fC--load\fR which allows loading an environment from a file. +Any arguments given will be passed to guix shell. For example, \fB\fCuse guix hello\fR would setup an environment including the hello package. To create an environment with the hello dependencies, the \fB\fC--development\fR flag is used \fB\fCuse guix --development hello\fR\&. Other options include \fB\fC--file\fR which allows loading an environment from a file. .PP -See https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-environment.html +See https://guix.gnu.org/en/manual/en/guix.html#Invoking-guix-shell .SS \fB\fCrvm [...]\fR .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/man/direnv-stdlib.1.md new/direnv-2.32.3/man/direnv-stdlib.1.md --- old/direnv-2.32.2/man/direnv-stdlib.1.md 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/man/direnv-stdlib.1.md 2023-05-20 11:32:49.000000000 +0200 @@ -328,11 +328,11 @@ ### `use guix [...]` -Load environment variables from `guix environment`. +Load environment variables from `guix shell`. -Any arguments given will be passed to guix environment. For example, `use guix hello` would setup an environment with the dependencies of the hello package. To create an environment including hello, the `--ad-hoc` flag is used `use guix --ad-hoc hello`. Other options include `--load` which allows loading an environment from a file. +Any arguments given will be passed to guix shell. For example, `use guix hello` would setup an environment including the hello package. To create an environment with the hello dependencies, the `--development` flag is used `use guix --development hello`. Other options include `--file` which allows loading an environment from a file. -See https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-environment.html +See https://guix.gnu.org/en/manual/en/guix.html#Invoking-guix-shell ### `rvm [...]` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/stdlib.sh new/direnv-2.32.3/stdlib.sh --- old/direnv-2.32.2/stdlib.sh 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/stdlib.sh 2023-05-20 11:32:49.000000000 +0200 @@ -468,7 +468,7 @@ # Usage: source_url <url> <integrity-hash> # -# Fetches a URL and evalutes its content. +# Fetches a URL and evaluates its content. source_url() { local url=$1 integrity_hash=${2:-} path if [[ -z $url ]]; then @@ -813,7 +813,7 @@ else local python_version ve # shellcheck disable=SC2046 - read -r python_version ve <<<$($python -c "import pkgutil as u, platform as p;ve='venv' if u.find_loader('venv') else ('virtualenv' if u.find_loader('virtualenv') else '');print(p.python_version()+' '+ve)") + read -r python_version ve <<<$($python -c "import pkgutil as u, platform as p;ve='venv' if u.find_loader('venv') else ('virtualenv' if u.find_loader('virtualenv') else '');print('.'.join(p.python_version_tuple()[:2])+' '+ve)") if [[ -z $python_version ]]; then log_error "Could not find python's version" return 1 @@ -1190,7 +1190,7 @@ return 1 fi - # Search for the highest version matchin $version in the folder + # Search for the highest version matching $version in the folder search_version=$(semver_search "$NODE_VERSIONS" "${node_version_prefix}" "${version}") node_prefix="${NODE_VERSIONS}/${node_version_prefix}${search_version}" @@ -1272,16 +1272,16 @@ # Usage: use_guix [...] # -# Load environment variables from `guix environment`. -# Any arguments given will be passed to guix environment. For example, -# `use guix hello` would setup an environment with the dependencies of -# the hello package. To create an environment including hello, the -# `--ad-hoc` flag is used `use guix --ad-hoc hello`. Other options -# include `--load` which allows loading an environment from a +# Load environment variables from `guix shell`. +# Any arguments given will be passed to guix shell. For example, +# `use guix hello` would setup an environment including the hello +# package. To create an environment with the hello dependencies, the +# `--development` flag is used `use guix --development hello`. Other +# options include `--file` which allows loading an environment from a # file. For a full list of options, consult the documentation for the -# `guix environment` command. +# `guix shell` command. use_guix() { - eval "$(guix environment "$@" --search-paths)" + eval "$(guix shell "$@" --search-paths)" } # Usage: use_vim [<vimrc_file>] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/test/direnv-test-common.sh new/direnv-2.32.3/test/direnv-test-common.sh --- old/direnv-2.32.2/test/direnv-test-common.sh 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/test/direnv-test-common.sh 2023-05-20 11:32:49.000000000 +0200 @@ -285,6 +285,13 @@ [[ $FOO = bar ]] test_stop +# Make sure that directories with names that can end up creating paths like +# \b or \r are not broken (Windows specific issue). +test_start 'special-characters/backspace/return' + direnv_eval + test_eq "${HI}" "there" +test_stop + # Context: foo/bar is a symlink to ../baz. foo/ contains and .envrc file # BUG: foo/bar is resolved in the .envrc execution context and so can't find # the .envrc file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/test/scenarios/special-characters/backspace/return/.envrc new/direnv-2.32.3/test/scenarios/special-characters/backspace/return/.envrc --- old/direnv-2.32.2/test/scenarios/special-characters/backspace/return/.envrc 1970-01-01 01:00:00.000000000 +0100 +++ new/direnv-2.32.3/test/scenarios/special-characters/backspace/return/.envrc 2023-05-20 11:32:49.000000000 +0200 @@ -0,0 +1 @@ +export HI=there diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/direnv-2.32.2/version.txt new/direnv-2.32.3/version.txt --- old/direnv-2.32.2/version.txt 2022-11-24 19:54:13.000000000 +0100 +++ new/direnv-2.32.3/version.txt 2023-05-20 11:32:49.000000000 +0200 @@ -1 +1 @@ -2.32.2 +2.32.3