UNPKG

1.32 kBJavaScriptView Raw
1//
2// Copyright (c) Microsoft and contributors. All rights reserved.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17var AutoComplete = require('../lib/autocomplete');
18//load the autocomplete, so that rest code in the file will not execute
19//till the command gets committed. This gets autocomplete faster
20new AutoComplete();
21
22var AzureCli = require('../lib/cli');
23var Constants = require('../lib/util/constants');
24
25if (process.argv[2] !== '--gen') {
26 cli = new AzureCli();
27 cli.parse(process.argv);
28 if (cli.args.length === 0) {
29 cli.parse(['', '', '-h']);
30 }
31} else {
32 if (process.argv[3]) {
33 cli = new AzureCli(null, null, process.argv[3]);
34 } else {
35 cli = new AzureCli(null, null, Constants.API_VERSIONS.ARM);
36 cli = new AzureCli(null, null, Constants.API_VERSIONS.ASM);
37 }
38}
\No newline at end of file