-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setting name and email config for git, seeing if that helps
- Loading branch information
1 parent
ff60b80
commit f1cd74d
Showing
3 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -260,7 +260,7 @@ describe("deploy", () => { | |
const {stdout, stderr} = await promisify(exec)( | ||
"touch readme.md; git add .; git commit -m 'initial'; git remote add origin [email protected]:observablehq/test.git" | ||
); | ||
console.log({stdout, stderr}); | ||
console.log("starts cloud build test", {stdout, stderr}); | ||
|
||
await deploy(TEST_OPTIONS, effects); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { exec } from "child_process"; | ||
import { mkdtemp, rm } from "fs/promises"; | ||
import { tmpdir } from "os"; | ||
import { join } from "path/posix"; | ||
import { promisify } from "util"; | ||
import {exec} from "child_process"; | ||
import {mkdtemp, rm} from "fs/promises"; | ||
import {tmpdir} from "os"; | ||
import {join} from "path/posix"; | ||
import {promisify} from "util"; | ||
|
||
export function mockIsolatedDirectory({ git }: { git: boolean; }) { | ||
export function mockIsolatedDirectory({git}: {git: boolean}) { | ||
let dir: string; | ||
let cwd: string; | ||
beforeEach(async () => { | ||
|
@@ -13,15 +13,17 @@ export function mockIsolatedDirectory({ git }: { git: boolean; }) { | |
process.chdir(dir); | ||
if (git) { | ||
console.log("logging stdout, stderr"); | ||
const a = (await promisify(exec)("git config --global init.defaultBranch main")) | ||
const a = await promisify(exec)( | ||
"git config --global user.email \"[email protected]\"; git config --global user.name \"Your Name\"; git config --global init.defaultBranch main" | ||
); | ||
console.log(a.stdout, a.stderr); | ||
const b = (await promisify(exec)("git init")); | ||
const b = await promisify(exec)("git init"); | ||
console.log(b.stdout, b.stderr); | ||
}; | ||
} | ||
}); | ||
|
||
afterEach(async () => { | ||
process.chdir(cwd); | ||
await rm(dir, { recursive: true }); | ||
await rm(dir, {recursive: true}); | ||
}); | ||
} |