Skip to content

Commit

Permalink
Fix hook args.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Sep 28, 2023
1 parent 200ecee commit f80013c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/core/moon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub async fn load_workspace() -> miette::Result<Workspace> {
if !is_test_env() {
if workspace.vcs.is_enabled() {
if let Ok(slug) = workspace.vcs.get_repository_slug().await {
env::set_var("MOON_REPO_SLUG", slug);
env::set_var("MOONBASE_REPO_SLUG", slug);
}
}

Expand Down
1 change: 0 additions & 1 deletion nextgen/api/src/launchpad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ fn create_anonymous_rid(workspace_root: &Path) -> String {
"{:x}",
md5::compute(
env::var("MOONBASE_REPO_SLUG")
.or_else(|_| env::var("MOON_REPO_SLUG"))
.unwrap_or_else(|_| fs::file_name(workspace_root)),
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ expression: "fs::read_to_string(post_push).unwrap()"
#!/usr/bin/env bash
set -eo pipefail

./.moon/hooks/post-push.sh
./.moon/hooks/post-push.sh $1 $2 $3
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ expression: "fs::read_to_string(pre_commit).unwrap()"
#!/usr/bin/env bash
set -eo pipefail

./.moon/hooks/pre-commit.sh
./.moon/hooks/pre-commit.sh $1 $2 $3
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source: nextgen/vcs-hooks/tests/hooks_generator_test.rs
expression: "out2.replace(\"powershell.exe\", \"pwsh.exe\")"
---
#!/bin/sh
pwsh.exe -NoProfile -ExecutionPolicy Bypass -File '.\.moon\hooks\post-push.ps1'
pwsh.exe -NoProfile -ExecutionPolicy Bypass -File ".\.moon\hooks\post-push.ps1 $1 $2 $3"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source: nextgen/vcs-hooks/tests/hooks_generator_test.rs
expression: "out1.replace(\"powershell.exe\", \"pwsh.exe\")"
---
#!/bin/sh
pwsh.exe -NoProfile -ExecutionPolicy Bypass -File '.\.moon\hooks\pre-commit.ps1'
pwsh.exe -NoProfile -ExecutionPolicy Bypass -File ".\.moon\hooks\pre-commit.ps1 $1 $2 $3"
2 changes: 2 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#### 🐞 Fixes

- Fixed an issue where non-YAML files in `.moon/tasks` would be parsed as YAML configs.
- Fixed an issue where arguments were not passed to generated Git hooks.
- Fixed an issue where moonbase would fail to sign in in CI.

## 1.14.1

Expand Down

0 comments on commit f80013c

Please sign in to comment.