Linter fix
This commit is contained in:
		
							parent
							
								
									e9fe358191
								
							
						
					
					
						commit
						c4e9f54a74
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -27,8 +27,12 @@ vim.api.nvim_create_autocmd('TextYankPost', { | ||||||
| 
 | 
 | ||||||
| vim.api.nvim_create_user_command('CDToGitRoot', function() | vim.api.nvim_create_user_command('CDToGitRoot', function() | ||||||
|   local handle = io.popen 'git rev-parse --show-toplevel 2>/dev/null' |   local handle = io.popen 'git rev-parse --show-toplevel 2>/dev/null' | ||||||
|   local git_root = handle:read('*a'):gsub('\n', '') |   local git_root | ||||||
|   handle:close() | 
 | ||||||
|  |   if handle then | ||||||
|  |     git_root = handle:read('*a'):gsub('\n', '') | ||||||
|  |     handle:close() | ||||||
|  |   end | ||||||
| 
 | 
 | ||||||
|   if git_root == '' then |   if git_root == '' then | ||||||
|     print 'Not in a Git repository' |     print 'Not in a Git repository' | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Imbus
						Imbus