Skip to content

Commit e606186

Browse files
committed
do not startup if files are not found
1 parent ef99192 commit e606186

12 files changed

+29
-16
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include(cmake/prelude.cmake)
55
set(CMAKE_CXX_STANDARD 17)
66
project(
77
lnav
8-
VERSION 0.13.1
8+
VERSION 0.13.2
99
DESCRIPTION "An advanced log file viewer for the terminal."
1010
HOMEPAGE_URL "https://lnav.org/"
1111
LANGUAGES CXX C

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11

2-
## lnav v0.13.1a
2+
## lnav v0.13.2
33

44
Bug Fixes:
55
* Kitty keyboard handling was broken at the last minute.
6+
* The TUI no longer opens if a bad file name is passed.
7+
* The abbreviated month `%b` time-conversion was not
8+
always falling back to English locale, which could
9+
prevent lnav from starting up.
610

711
## lnav v0.13.1
812

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([lnav],[0.13.1a],[lnav@googlegroups.com],[lnav],[http://lnav.org])
1+
AC_INIT([lnav],[0.13.2],[lnav@googlegroups.com],[lnav],[http://lnav.org])
22
AC_CONFIG_SRCDIR([src/lnav.cc])
33
AC_CONFIG_MACRO_DIR([m4])
44
AM_INIT_AUTOMAKE([foreign subdir-objects])

release/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
VERSION=0.13.1a
2+
VERSION=0.13.2
33

44
VERSION_TAG=v$(VERSION)
55

src/base/fs_util.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ determine_path_type(const std::string& arg)
206206
return path_type::url;
207207
}
208208

209-
switch (arg.find(':')) {
210-
case 0:
211-
return path_type::normal;
212-
case 1:
213-
return path_type::windows;
214-
default:
215-
return path_type::remote;
209+
const auto colon_pos = arg.find(':');
210+
if (colon_pos == std::string::npos) {
211+
return path_type::normal;
212+
}
213+
if (colon_pos == 1) {
214+
return path_type::windows;
216215
}
216+
return path_type::remote;
217217
}
218218

219219
path_transcoder

test/expected/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ dist_noinst_DATA = \
44
test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.out \
55
test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.err \
66
test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.out \
7+
test_cli.sh_1507a515f62dfc9ad0af85decadbd7921be9b96d.err \
8+
test_cli.sh_1507a515f62dfc9ad0af85decadbd7921be9b96d.out \
79
test_cli.sh_17a68b798354f9a6cdfab372006caeb74038d15c.err \
810
test_cli.sh_17a68b798354f9a6cdfab372006caeb74038d15c.out \
911
test_cli.sh_1ec76eb2416d2c09c13eba62ff8bcf920a888b9c.err \
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
✘ error: unable to open file: badfilename
2+
reason: No such file or directory
3+
✘ error: unable to display interactive text UI
4+
reason: stdout is not a TTY
5+
 = help: pass the -n option to run lnav in headless mode or don't redirect stdout

test/expected/test_cli.sh_1507a515f62dfc9ad0af85decadbd7921be9b96d.out

Whitespace-only changes.

test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
lnav 0.13.1a
2+
lnav 0.13.2
33

44
A fancy log file viewer for the terminal.
55

test/expected/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# '|/path/to/this/file' in lnav to execute this file and
44
# restore the state of the session.
55

6-
;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.13.1a' || ' or later')
7-
WHERE lnav_version() < '0.13.1a' COLLATE naturalcase
6+
;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.13.2' || ' or later')
7+
WHERE lnav_version() < '0.13.2' COLLATE naturalcase
88

99
# The files loaded into the session were:
1010

0 commit comments

Comments
 (0)