diff options
| author | Evgeny Pisemsky <mail@pisemsky.site> | 2026-07-23 18:50:03 +0300 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-07-23 23:45:30 +0200 |
| commit | 36d403cfd77ff5452978cf94425902675e6ad81b (patch) | |
| tree | 83051b32530ccaf4076474eaecc7f13ab35ba1cf /tests | |
| parent | d8ccd4af95f8c641f03892a6d308e20aa3846ad0 (diff) | |
scripts: system: Remove unused syntax.
* guix/scripts/system.scm (save-environment-excursion): Remove syntax.
* tests/profiles.scm (with-environment-excursion): Prepare syntax for reuse.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
Merges: #10134
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/profiles.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 55e7146a7a0..e2472aa9e85 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm | |||
| @@ -367,11 +367,13 @@ | |||
| 367 | (profile -> (derivation->output-path drv)) | 367 | (profile -> (derivation->output-path drv)) |
| 368 | (bindir -> (string-append profile "/bin")) | 368 | (bindir -> (string-append profile "/bin")) |
| 369 | (_ (built-derivations (list drv)))) | 369 | (_ (built-derivations (list drv)))) |
| 370 | (define-syntax-rule (with-environment-excursion exp ...) | 370 | (define-syntax-rule (with-environment-excursion body ...) |
| 371 | ;; Save the current environment variables, run BODY..., and restore | ||
| 372 | ;; them. | ||
| 371 | (let ((env (environ))) | 373 | (let ((env (environ))) |
| 372 | (dynamic-wind | 374 | (dynamic-wind |
| 373 | (const #t) | 375 | (const #t) |
| 374 | (lambda () exp ...) | 376 | (lambda () body ...) |
| 375 | (lambda () (environ env))))) | 377 | (lambda () (environ env))))) |
| 376 | 378 | ||
| 377 | (return (and (with-environment-excursion | 379 | (return (and (with-environment-excursion |
