Skip to content
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
2 changes: 1 addition & 1 deletion components/server/src/workspace/config-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export class ConfigProvider {
}
const repoHost = hostContext.services;
const lastDockerFileSha = await repoHost.fileProvider
.getLastChangeRevision(repository, revisionOrTagOrBranch, user, dockerFilePath)
.getLastChangeRevision(repository, revisionOrTagOrBranch, user, path.normalize(dockerFilePath))
.catch((e) => {
if (e instanceof RevisionNotFoundError) {
return ImageFileRevisionMissing;
Expand Down
12 changes: 9 additions & 3 deletions components/server/src/workspace/image-source-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/

import { injectable, inject } from "inversify";
import { createHash } from "crypto";
import path from "path";
import { HostContextProvider } from "../auth/host-context-provider";
import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing";
import {
Expand All @@ -18,7 +20,6 @@ import {
User,
AdditionalContentContext,
} from "@gitpod/gitpod-protocol";
import { createHash } from "crypto";
import { ImageFileRevisionMissing, RevisionNotFoundError } from "../repohost";

@injectable()
Expand All @@ -45,7 +46,12 @@ export class ImageSourceProvider {
throw new Error(`Cannot fetch workspace image source for host: ${repository.host}`);
}
const lastDockerFileSha = await hostContext.services.fileProvider
.getLastChangeRevision(repository, imgcfg.externalSource.revision, user, imgcfg.file)
.getLastChangeRevision(
repository,
imgcfg.externalSource.revision,
user,
path.normalize(imgcfg.file),
)
.catch((e) => {
if (e instanceof RevisionNotFoundError) {
return ImageFileRevisionMissing;
Expand Down Expand Up @@ -76,7 +82,7 @@ export class ImageSourceProvider {
throw new Error(`Cannot fetch workspace image source for host: ${context.repository.host}`);
}
const lastDockerFileSha = await hostContext.services.fileProvider
.getLastChangeRevision(context.repository, context.revision, user, imgcfg.file)
.getLastChangeRevision(context.repository, context.revision, user, path.normalize(imgcfg.file))
.catch((e) => {
if (e instanceof RevisionNotFoundError) {
return ImageFileRevisionMissing;
Expand Down
Loading