Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Fix restic binary #73

Merged
merged 3 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed
- Wrong binary permissions in container ([#70])
## [v0.2.1] 2021-03-04
### Fixed
- Make waiting for locks more stable
Expand Down Expand Up @@ -150,3 +151,4 @@ compatibility with older operator versions. Changes to the design contain:
[#27]: https://github.com/vshn/wrestic/pull/27
[#28]: https://github.com/vshn/wrestic/pull/28
[#57]: https://github.com/vshn/wrestic/pull/57
[#70]: https://github.com/vshn/wrestic/issues/70
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN set -x; \
&& wget "https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_amd64.bz2" \
&& bunzip2 "restic_${RESTIC_VERSION}_linux_amd64.bz2" \
&& mkdir /build \
&& mv "restic_${RESTIC_VERSION}_linux_amd64" /build/restic
&& mv "restic_${RESTIC_VERSION}_linux_amd64" /build/restic \
&& chmod +x /build/restic

WORKDIR /app
COPY go.mod go.sum ./
Expand Down
6 changes: 6 additions & 0 deletions restic/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ func (c *Command) Wait() {
c.FatalError = fmt.Errorf("command not configured")
return
}

if c.cmd.Process == nil {
c.FatalError = fmt.Errorf("the process did not start, please check if execution bit is set")
return
}

err := c.cmd.Wait()
if err != nil {
// The error could contain an IO error...
Expand Down