microsoft/Terminal
View on GitHubShow a warning if the background image can't be loaded
Open
#6,128 opened on May 22, 2020
Area-SettingsHelp WantedIssue-TaskPriority-3Product-Terminal
Repository metrics
- Stars
- (35,764 stars)
- PR merge metrics
- (Avg merge 27d 19h) (24 merged PRs in 30d)
Description
Hi,
The backgroundImage parameter in settings.json has a somewhat permissive path, for example all the following examples work:
- Windows directory separators:
C:\\<username>\\Pictures\\some image.png - Unix directory separators:
C:/<username>/Pictures/some image.png - A mix of both Windows/Unix directory separators:
C:\\<username>\\Pictures/some image.png - URI using file scheme for filesystem access:
file://C:/<username>/Pictures/some image.png - HTTP URI:
https://somesite.xyz/image.jpg
Other related issue:
- when
backgroundImagepoints to a non existing file/URI, Windows terminal does not show a warning or error, it could be handled this way: - on a non existing file on the filesystem: throw an warning/error that the file for the given file path does not exist
- HTTP URI: if the resource returns a status code other than
200throw an warning/error that the URI is incorrect - if the file format is unsupported/unreadable: throw an appropriate error
Since users can both use Unix/Windows separators I thought It was the best to describe this issue before filing a documentation feedback.
Configuration:
- Windows version: 10 - 1909 (18363.836) - 64 bits
- Distribution method: compiled for master branch/deployed manually using Visual Studio 2019 (16.5.4)
- Compilation settings: Release/64 bits / all submoduled needed to be checked out in order for compilation to work
- Project compiled: CascadiaCode
- Windows terminal version: - Slightly ahead of v1.0.1401.0 (first public release) pointing to commit: 8265d941b7fbea8b702d3381fa93a92417dec2ce
Terminal configuration:
- settings.json location:
C:\Users\<username>\AppData\Local\Packages\WindowsTerminalDev_8wekyb3d8bbwe\LocalState\settings.json