#288: migrating tool from 0.6.0 to 0.6.1 breaks users.
This commit is contained in:
Родитель
f915264771
Коммит
14167f905c
|
@ -427,7 +427,32 @@ exports.init = function (cli) {
|
|||
|
||||
account.managementEndpointUrl = function () {
|
||||
var cfg = account.readConfig();
|
||||
|
||||
// check if it is the configuration format used
|
||||
// by version <= 0.6.0 and if so fix-up
|
||||
if (cfg.port) {
|
||||
cfg.endpoint = url.format({
|
||||
protocol: 'http',
|
||||
hostname: cfg.endpoint,
|
||||
port: cfg.port
|
||||
});
|
||||
|
||||
delete cfg.port;
|
||||
|
||||
// Save fixed-up configuration
|
||||
account.writeConfig(cfg);
|
||||
}
|
||||
|
||||
// Check if there is a value for Subscription (caps) and
|
||||
// if so fix-up to all lower case
|
||||
if (cfg.Subscription) {
|
||||
cfg.subscription = cfg.Subscription;
|
||||
delete cfg.Subscription;
|
||||
|
||||
// Save fixed-up configuration
|
||||
account.writeConfig(cfg);
|
||||
}
|
||||
|
||||
return cfg.endpoint;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
Загрузка…
Ссылка в новой задаче