mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-14 17:18:46 +02:00
Add basic support for stripping out HISTTIMEFORMAT prefixes
This commit is contained in:
@ -61,6 +61,13 @@ func BackupAndRestoreWithId(t *testing.T, id string) func() {
|
||||
}
|
||||
}
|
||||
|
||||
func BackupAndRestoreEnv(k string) func() {
|
||||
origValue := os.Getenv(k)
|
||||
return func() {
|
||||
os.Setenv(k, origValue)
|
||||
}
|
||||
}
|
||||
|
||||
func checkError(err error) {
|
||||
if err != nil && os.Getenv("GITHUB_ACTION") == "" {
|
||||
_, filename, line, _ := runtime.Caller(1)
|
||||
|
Reference in New Issue
Block a user