File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change
1
+ const { dirname } = require ( 'path' ) ;
1
2
class ScreenHelper {
2
3
static async alertError ( context , message ) {
3
4
return await context . app . alert ( 'Erro!' , message ) ;
4
5
}
5
6
6
7
static async askRepoPath ( context , options = { } ) {
7
8
await context . app . alert (
8
- 'Selecione Repositorio ' ,
9
- `Escolha o repositorio para sincronizar workspaces\nWorkspace Atual : ${ options . currentPath } `
9
+ 'Select repository ' ,
10
+ `Chose the repository to synchronize your workspace\nCurrent path : ${ options . currentPath } `
10
11
) ;
11
12
const path = await context . app . showSaveDialog ( { defaultPath : options . workspaceName } ) ;
12
13
13
- return normalizePath ( path ) ;
14
+ return dirname ( path ) ;
14
15
}
15
16
}
16
17
17
- const normalizePath = ( path ) => {
18
- if ( path == null || path == 'undefined' ) return null ;
19
-
20
- return path . substr ( 0 , path . lastIndexOf ( '/' ) ) ;
21
- } ;
22
-
23
18
module . exports = ScreenHelper ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const ScreenHelper = require('./ScreenHelper.js');
5
5
const verifyRepoConfig = async ( repo , context ) => {
6
6
if ( await repo . isConfigured ( context ) ) return true ;
7
7
8
- ScreenHelper . alertError ( context , 'Workspace não foi setado! ' ) ;
8
+ ScreenHelper . alertError ( context , 'Workspace was not set ' ) ;
9
9
return false ;
10
10
} ;
11
11
You can’t perform that action at this time.
0 commit comments