prettier (#8836)
Co-authored-by: Catalina Peralta <caperal@microsoft.com>
This commit is contained in:
Родитель
2eaf22b95a
Коммит
7aea8e68ab
|
@ -16,43 +16,43 @@ export async function cloneRepo(rootUrl: string, cloneDir: string, repo: string)
|
|||
});
|
||||
}
|
||||
|
||||
export async function sparseCheckout(cloneDir: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const git = spawn("git", ["sparse-checkout", "init"], {
|
||||
cwd: cloneDir,
|
||||
stdio: "inherit",
|
||||
});
|
||||
git.once("exit", (code) => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`git sparse-checkout failed exited with code ${code}`));
|
||||
}
|
||||
});
|
||||
git.once("error", (err) => {
|
||||
reject(new Error(`git sparse-checkout failed with error: ${err}`));
|
||||
});
|
||||
export async function sparseCheckout(cloneDir: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const git = spawn("git", ["sparse-checkout", "init"], {
|
||||
cwd: cloneDir,
|
||||
stdio: "inherit",
|
||||
});
|
||||
}
|
||||
git.once("exit", (code) => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`git sparse-checkout failed exited with code ${code}`));
|
||||
}
|
||||
});
|
||||
git.once("error", (err) => {
|
||||
reject(new Error(`git sparse-checkout failed with error: ${err}`));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function addSpecFiles(cloneDir: string, subDir: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const git = spawn("git", ["sparse-checkout", "add", subDir], {
|
||||
cwd: cloneDir,
|
||||
stdio: "inherit",
|
||||
});
|
||||
git.once("exit", (code) => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`git sparse-checkout add failed exited with code ${code}`));
|
||||
}
|
||||
});
|
||||
git.once("error", (err) => {
|
||||
reject(new Error(`git sparse-checkout add failed with error: ${err}`));
|
||||
});
|
||||
export async function addSpecFiles(cloneDir: string, subDir: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const git = spawn("git", ["sparse-checkout", "add", subDir], {
|
||||
cwd: cloneDir,
|
||||
stdio: "inherit",
|
||||
});
|
||||
}
|
||||
git.once("exit", (code) => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`git sparse-checkout add failed exited with code ${code}`));
|
||||
}
|
||||
});
|
||||
git.once("error", (err) => {
|
||||
reject(new Error(`git sparse-checkout add failed with error: ${err}`));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function checkoutCommit(cloneDir: string, commit: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function npmCommand(workingDir: string, args: string[]): Promise<vo
|
|||
}
|
||||
|
||||
export async function nodeCommand(workingDir: string, args: string[]): Promise<void> {
|
||||
Logger.debug("node " + args.join(' '));
|
||||
Logger.debug("node " + args.join(" "));
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const node = spawn("node", args, {
|
||||
|
|
|
@ -28,9 +28,7 @@ describe("Verify tsp-location.yaml", function () {
|
|||
directory: "specification/contosowidgetmanager/Contoso.WidgetManager",
|
||||
commit: "1234567",
|
||||
repo: "foo",
|
||||
additionalDirectories: [
|
||||
"specification/contosowidgetmanager/Contoso.WidgetManager.Shared",
|
||||
],
|
||||
additionalDirectories: ["specification/contosowidgetmanager/Contoso.WidgetManager.Shared"],
|
||||
};
|
||||
await writeTspLocationYaml(tspLocation, "./test/examples/");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче