Skip to content

Commit

Permalink
use const
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinaperalta committed Nov 16, 2023
1 parent 7d4f5e9 commit 0116229
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/tsp-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,13 @@ async function main() {
throw new Error("Commit SHA is required when specifying `--repo`, please specify a commit using `--commit`");
}
if (options.commit) {
let tspLocation: TspLocation = await readTspLocation(rootUrl);
const tspLocation: TspLocation = await readTspLocation(rootUrl);
tspLocation.commit = options.commit ?? tspLocation.commit;
tspLocation.repo = options.repo ?? tspLocation.repo;
await writeFile(path.join(rootUrl, "tsp-location.yaml"), `directory: ${tspLocation.directory}\ncommit: ${tspLocation.commit}\nrepo: ${tspLocation.repo}\nadditionalDirectories: ${tspLocation.additionalDirectories}`);
}
if (options.tspConfig) {
let tspLocation: TspLocation = await readTspLocation(rootUrl);
let tspConfig = resolveTspConfigUrl(options.tspConfig);
} else if (options.tspConfig) {
const tspLocation: TspLocation = await readTspLocation(rootUrl);
const tspConfig = resolveTspConfigUrl(options.tspConfig);
tspLocation.commit = tspConfig.commit ?? tspLocation.commit;
tspLocation.repo = tspConfig.repo ?? tspLocation.repo;
await writeFile(path.join(rootUrl, "tsp-location.yaml"), `directory: ${tspLocation.directory}\ncommit: ${tspLocation.commit}\nrepo: ${tspLocation.repo}\nadditionalDirectories: ${tspLocation.additionalDirectories}`);
Expand Down

0 comments on commit 0116229

Please sign in to comment.