Skip to content

Commit

Permalink
Merge 3d31ebf into 9906dea
Browse files Browse the repository at this point in the history
  • Loading branch information
TrCaM committed Aug 20, 2019
2 parents 9906dea + 3d31ebf commit 2038ddc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 207 deletions.
2 changes: 0 additions & 2 deletions src/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ module.exports = function(client) {
client.target.apply = loadCommand("target-apply");
client.target.clear = loadCommand("target-clear");
client.target.remove = loadCommand("target-remove");
client.tools = {};
client.tools.migrate = loadCommand("tools-migrate");
client.use = loadCommand("use");

if (previews.mods || previews.ext) {
Expand Down
107 changes: 0 additions & 107 deletions src/commands/tools-migrate.js

This file was deleted.

25 changes: 0 additions & 25 deletions src/identifierToProjectId.js

This file was deleted.

35 changes: 5 additions & 30 deletions src/requireAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as clc from "cli-color";
import * as getInstanceId from "./getInstanceId";
import * as getProjectId from "./getProjectId";
import { FirebaseError } from "./error";
import * as identifierToProjectId from "./identifierToProjectId";
import * as requireAuth from "./requireAuth";

export function requireAccess(options: any): Promise<any> {
Expand All @@ -28,34 +27,10 @@ export function requireAccess(options: any): Promise<any> {
return Promise.reject(err);
}

return identifierToProjectId(projectId).then((realProjectId) => {
if (realProjectId) {
let fixCommand = "firebase use " + realProjectId;
if (options.projectAlias) {
fixCommand += " --alias " + options.projectAlias;
}

return Promise.reject(
new FirebaseError(
"Tried to access unrecognized project " +
clc.bold(projectId) +
", but found matching instance for project " +
clc.bold(realProjectId) +
".\n\n" +
"To use " +
clc.bold(realProjectId) +
" instead, run:\n\n " +
clc.bold(fixCommand),
{ exit: 1 }
)
);
}

return Promise.reject(
new FirebaseError("Unable to authorize access to project " + clc.bold(projectId), {
exit: 1,
})
);
});
return Promise.reject(
new FirebaseError("Unable to authorize access to project " + clc.bold(projectId), {
exit: 1,
})
);
});
}
43 changes: 0 additions & 43 deletions src/test/identifierToProjectId.spec.js

This file was deleted.

0 comments on commit 2038ddc

Please sign in to comment.