Skip to content

Commit

Permalink
master: fix SQLite asking for passwords. Closes #396
Browse files Browse the repository at this point in the history
  • Loading branch information
mtxr committed Sep 28, 2019
1 parent b432e16 commit 14c00f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/plugins/connection-manager/extension.ts
@@ -1,7 +1,7 @@
import logger from '@sqltools/core/log/vscode';
import ConfigManager from '@sqltools/core/config-manager';
import { EXT_NAME } from '@sqltools/core/constants';
import { ConnectionInterface } from '@sqltools/core/interface';
import { ConnectionInterface, DatabaseDialect } from '@sqltools/core/interface';
import getTableName from '@sqltools/core/utils/query/prefixed-tablenames';
import SQLTools, { RequestHandler } from '@sqltools/core/plugin-api';
import { getConnectionDescription, getConnectionId, isEmpty } from '@sqltools/core/utils';
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class ConnectionManagerPlugin implements SQLTools.ExtensionPlugin
private ext_testConnection = async (c: ConnectionInterface) => {
let password = null;

if (c.askForPassword) password = await this._askForPassword(c);
if (c.dialect !== DatabaseDialect.SQLite && c.askForPassword) password = await this._askForPassword(c);
if (c.askForPassword && password === null) return;
return this.client.sendRequest(
TestConnectionRequest,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/screens/Settings/Widget/ConnectionInfo.tsx
Expand Up @@ -50,7 +50,7 @@ const ConnectionInfo = ({ updateSettings, submit, toggleGlobal, testConnection,
</button>
</div>
</form>
{<pre>{JSON.stringify(connectionSettings, null, 2)}</pre>}
{/* {<pre>{JSON.stringify(connectionSettings, null, 2)}</pre>} */}
{/* {<pre>{JSON.stringify(errors, null, 2)}</pre>} */}
{/* {<pre>{JSON.stringify(state, null, 2)}</pre>} */}
</>
Expand Down

0 comments on commit 14c00f3

Please sign in to comment.