mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 15:12:20 +00:00 
			
		
		
		
	#N/A: Support relative paths in cache decorator
This commit is contained in:
		| @@ -36,7 +36,7 @@ class Fish(Generic): | ||||
|                 'end').format(alias_name, alter_history) | ||||
|  | ||||
|     @memoize | ||||
|     @cache('.config/fish/config.fish', '.config/fish/functions') | ||||
|     @cache('~/.config/fish/config.fish', '~/.config/fish/functions') | ||||
|     def get_aliases(self): | ||||
|         overridden = self._get_overridden_aliases() | ||||
|         proc = Popen(['fish', '-ic', 'functions'], stdout=PIPE, stderr=DEVNULL) | ||||
|   | ||||
| @@ -208,7 +208,7 @@ def cache(*depends_on): | ||||
|  | ||||
|     """ | ||||
|     def _get_mtime(name): | ||||
|         path = os.path.join(os.path.expanduser('~'), name) | ||||
|         path = Path(name).expanduser().absolute().as_posix() | ||||
|         try: | ||||
|             return str(os.path.getmtime(path)) | ||||
|         except OSError: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user